Skip to content

Commit 321aa78

Browse files
Update test to run all
* Fixed #274
1 parent 81eb717 commit 321aa78

32 files changed

+80
-297
lines changed

.dockerignore

Lines changed: 0 additions & 11 deletions
This file was deleted.

.kitchen.yml

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,58 @@ platforms:
2929
- name: local
3030

3131
suites:
32-
# Disabled due to issue #274
33-
# (https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/274)
34-
# - name: "deploy_service"
32+
- name: "simple_zonal"
33+
driver:
34+
root_module_directory: test/fixtures/simple_zonal
35+
verifier:
36+
systems:
37+
- name: gcloud
38+
backend: local
39+
controls:
40+
- gcloud
41+
- name: gcp
42+
backend: gcp
43+
controls:
44+
- gcp
45+
# - name: "stub_domains"
3546
# driver:
36-
# root_module_directory: test/fixtures/deploy_service
47+
# root_module_directory: test/fixtures/stub_domains
3748
# verifier:
3849
# systems:
39-
# - name: deploy_service
50+
# - name: stub_domains
4051
# backend: local
52+
# controls:
53+
# - gcloud
54+
# - kubectl
55+
- name: "deploy_service"
56+
driver:
57+
root_module_directory: test/fixtures/deploy_service
58+
verifier:
59+
systems:
60+
- name: deploy_service
61+
backend: local
62+
controls:
63+
- gcloud
64+
- kubectl
4165
- name: "disable_client_cert"
4266
driver:
4367
root_module_directory: test/fixtures/disable_client_cert
4468
verifier:
4569
systems:
4670
- name: disable_client_cert
4771
backend: local
48-
# Disabled due to issue #274
49-
# (https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/274)
50-
# - name: "node_pool"
51-
# driver:
52-
# root_module_directory: test/fixtures/node_pool
53-
# verifier:
54-
# systems:
55-
# - name: node_pool
56-
# backend: local
72+
controls:
73+
- gcloud
74+
- name: "node_pool"
75+
driver:
76+
root_module_directory: test/fixtures/node_pool
77+
verifier:
78+
systems:
79+
- name: node_pool
80+
backend: local
81+
controls:
82+
- gcloud
83+
- kubectl
5784
- name: "shared_vpc"
5885
driver:
5986
root_module_directory: test/fixtures/shared_vpc
@@ -75,33 +102,38 @@ suites:
75102
systems:
76103
- name: simple_regional_private
77104
backend: local
78-
- name: "simple_zonal"
79-
driver:
80-
root_module_directory: test/fixtures/simple_zonal
81-
verifier:
82-
systems:
83-
- name: gcloud
84-
backend: local
85-
controls:
86-
- gcloud
87-
- name: gcp
88-
backend: gcp
89-
controls:
90-
- gcp
105+
# - name: "simple_zonal"
106+
# driver:
107+
# root_module_directory: test/fixtures/simple_zonal
108+
# verifier:
109+
# systems:
110+
# - name: gcloud
111+
# backend: local
112+
# controls:
113+
# - gcloud
114+
# - name: gcp
115+
# backend: gcp
116+
# controls:
117+
# - gcp
91118
- name: "simple_zonal_private"
92119
driver:
93120
root_module_directory: test/fixtures/simple_zonal_private
94121
verifier:
95122
systems:
96123
- name: simple_zonal_private
97124
backend: local
125+
controls:
126+
- gcloud
98127
- name: "stub_domains"
99128
driver:
100129
root_module_directory: test/fixtures/stub_domains
101130
verifier:
102131
systems:
103132
- name: stub_domains
104133
backend: local
134+
controls:
135+
- gcloud
136+
- kubectl
105137
# Disabled due to issue #264
106138
# (https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/264)
107139
# - name: stub_domains_private

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Make will use bash instead of sh
1919
SHELL := /usr/bin/env bash
2020

21-
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.1.0
21+
DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.4.2
2222
DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools
2323
REGISTRY_URL := gcr.io/cloud-foundation-cicd
2424

build/int.cloudbuild.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ steps:
2929
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge']
3030
- id: verify
3131
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
32-
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify']
32+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && source_test_env && init_credentials && sleep 60 && kitchen_do verify']
3333
- id: destroy
3434
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
3535
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy']
@@ -38,4 +38,4 @@ tags:
3838
- 'integration'
3939
substitutions:
4040
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
41-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.1.0'
41+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.4.2'

build/lint.cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ tags:
2424
- 'lint'
2525
substitutions:
2626
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
27-
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.1.0'
27+
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.4.2'

examples/disable_client_cert/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ This example illustrates how to create a simple cluster and disable deprecated s
1212
|------|-------------|:----:|:-----:|:-----:|
1313
| cluster\_name\_suffix | A suffix to append to the default cluster name | string | `""` | no |
1414
| compute\_engine\_service\_account | Service account to associate to the nodes in the cluster | string | n/a | yes |
15-
| credentials\_path | The path to the GCP credentials JSON file | string | n/a | yes |
1615
| ip\_range\_pods | The secondary ip range to use for pods | string | n/a | yes |
1716
| ip\_range\_services | The secondary ip range to use for pods | string | n/a | yes |
1817
| network | The VPC network to host the cluster in | string | n/a | yes |

examples/disable_client_cert/variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ variable "project_id" {
1818
description = "The project ID to host the cluster in"
1919
}
2020

21-
variable "credentials_path" {
22-
description = "The path to the GCP credentials JSON file"
23-
}
24-
2521
variable "cluster_name_suffix" {
2622
description = "A suffix to append to the default cluster name"
2723
default = ""

examples/simple_regional_beta/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 2.12.0"
23-
credentials = file(var.credentials_path)
24-
region = var.region
22+
version = "~> 2.12.0"
23+
region = var.region
2524
}
2625

2726
module "gke" {

examples/simple_regional_beta/test_outputs.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ output "project_id" {
2121
value = var.project_id
2222
}
2323

24-
output "credentials_path" {
25-
value = var.credentials_path
26-
}
27-
2824
output "region" {
2925
value = module.gke.region
3026
}

examples/simple_regional_beta/variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ variable "project_id" {
1818
description = "The project ID to host the cluster in"
1919
}
2020

21-
variable "credentials_path" {
22-
description = "The path to the GCP credentials JSON file"
23-
}
24-
2521
variable "cluster_name_suffix" {
2622
description = "A suffix to append to the default cluster name"
2723
default = ""

examples/simple_regional_private_beta/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ locals {
1919
}
2020

2121
provider "google-beta" {
22-
version = "~> 2.12.0"
23-
credentials = file(var.credentials_path)
24-
region = var.region
22+
version = "~> 2.12.0"
23+
region = var.region
2524
}
2625

2726
data "google_compute_subnetwork" "subnetwork" {

examples/simple_regional_private_beta/test_outputs.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ output "project_id" {
2121
value = var.project_id
2222
}
2323

24-
output "credentials_path" {
25-
value = var.credentials_path
26-
}
27-
2824
output "region" {
2925
value = module.gke.region
3026
}

examples/simple_regional_private_beta/variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ variable "project_id" {
1818
description = "The project ID to host the cluster in"
1919
}
2020

21-
variable "credentials_path" {
22-
description = "The path to the GCP credentials JSON file"
23-
}
24-
2521
variable "cluster_name_suffix" {
2622
description = "A suffix to append to the default cluster name"
2723
default = ""

helpers/migrate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,5 @@ def argparser():
307307

308308

309309
if __name__ == "__main__":
310-
main(sys.argv)
310+
main(sys.argv)
311+

test/ci/deploy-service.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/ci/node-pool.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/ci/shared-vpc.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/ci/simple-regional-private.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/ci/simple-regional.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/ci/simple-zonal-private.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

test/ci/simple-zonal.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)