Skip to content

Commit 03f0931

Browse files
author
Aaron Lane
authored
Merge pull request terraform-google-modules#275 from paulpalamarchuk/fix_ci_tests_node_pool_deploy_service
Update test to run all
2 parents e3494d7 + 91e68b8 commit 03f0931

File tree

25 files changed

+75
-255
lines changed

25 files changed

+75
-255
lines changed

.dockerignore

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

.kitchen.yml

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,15 @@ 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"
35-
# driver:
36-
# root_module_directory: test/fixtures/deploy_service
37-
# verifier:
38-
# systems:
39-
# - name: deploy_service
40-
# backend: local
4132
- name: "disable_client_cert"
4233
driver:
4334
root_module_directory: test/fixtures/disable_client_cert
4435
verifier:
4536
systems:
4637
- name: disable_client_cert
4738
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
39+
controls:
40+
- gcloud
5741
- name: "shared_vpc"
5842
driver:
5943
root_module_directory: test/fixtures/shared_vpc
@@ -112,13 +96,18 @@ suites:
11296
systems:
11397
- name: simple_zonal_private
11498
backend: local
99+
controls:
100+
- gcloud
115101
- name: "stub_domains"
116102
driver:
117103
root_module_directory: test/fixtures/stub_domains
118104
verifier:
119105
systems:
120106
- name: stub_domains
121107
backend: local
108+
controls:
109+
- gcloud
110+
- kubectl
122111
# Disabled due to issue #264
123112
# (https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/issues/264)
124113
# - name: stub_domains_private
@@ -148,6 +137,26 @@ suites:
148137
systems:
149138
- name: workload_metadata_config
150139
backend: local
140+
- name: "deploy_service"
141+
driver:
142+
root_module_directory: test/fixtures/deploy_service
143+
verifier:
144+
systems:
145+
- name: deploy_service
146+
backend: local
147+
controls:
148+
- gcloud
149+
- kubectl
150+
- name: "node_pool"
151+
driver:
152+
root_module_directory: test/fixtures/node_pool
153+
verifier:
154+
systems:
155+
- name: node_pool
156+
backend: local
157+
controls:
158+
- gcloud
159+
- kubectl
151160
- name: "sandbox_enabled"
152161
driver:
153162
root_module_directory: test/fixtures/sandbox_enabled

build/int.cloudbuild.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,46 @@ steps:
241241
- verify workload-metadata-config-local
242242
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
243243
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy workload-metadata-config-local']
244+
- id: create deploy-service-local
245+
waitFor:
246+
- prepare
247+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
248+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create deploy-service-local']
249+
- id: converge deploy-service-local
250+
waitFor:
251+
- create deploy-service-local
252+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
253+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge deploy-service-local']
254+
- id: verify deploy-service-local
255+
waitFor:
256+
- converge deploy-service-local
257+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
258+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify deploy-service-local']
259+
- id: destroy deploy-service-local
260+
waitFor:
261+
- verify deploy-service-local
262+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
263+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy deploy-service-local']
264+
- id: create node-pool-local
265+
waitFor:
266+
- prepare
267+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
268+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do create node-pool-local']
269+
- id: converge node-pool-local
270+
waitFor:
271+
- create node-pool-local
272+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
273+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do converge node-pool-local']
274+
- id: verify node-pool-local
275+
waitFor:
276+
- converge node-pool-local
277+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
278+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do verify node-pool-local']
279+
- id: destroy node-pool-local
280+
waitFor:
281+
- verify node-pool-local
282+
name: 'gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS'
283+
args: ['/bin/bash', '-c', 'source /usr/local/bin/task_helper_functions.sh && kitchen_do destroy node-pool-local']
244284
- id: create sandbox-enabled-local
245285
waitFor:
246286
- prepare
@@ -267,3 +307,5 @@ tags:
267307
substitutions:
268308
_DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools'
269309
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.4.6'
310+
options:
311+
machineType: 'N1_HIGHCPU_8'

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_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.18.0"
23-
credentials = file(var.credentials_path)
24-
region = var.region
22+
version = "~> 2.18.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 = ""

examples/simple_zonal_private/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
locals {
18-
cluster_type = "simple-regional-private"
18+
cluster_type = "simple-zonal-private"
1919
}
2020

2121
provider "google" {

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.

test/ci/stub-domains-upstream-nameservers.yml

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

test/ci/stub-domains.yml

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

test/ci/upstream-nameservers.yml

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

0 commit comments

Comments
 (0)