Skip to content

Commit 35ead26

Browse files
authored
chore(CI): migrate remaining kitchen tests (#2242)
1 parent 4aad5e9 commit 35ead26

File tree

33 files changed

+1498
-923
lines changed

33 files changed

+1498
-923
lines changed

.kitchen.yml

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

build/int.cloudbuild.yaml

Lines changed: 102 additions & 108 deletions
Large diffs are not rendered by default.

test/fixtures/deploy_service/example.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2018-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,17 +13,20 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
locals {
17+
cluster_index = 1
18+
}
1619

1720
module "example" {
1821
source = "../../../examples/deploy_service"
1922

20-
project_id = var.project_ids[0]
23+
project_id = var.project_ids[local.cluster_index]
2124
cluster_name_suffix = "-${random_string.suffix.result}"
2225
region = var.region
2326
network = google_compute_network.main.name
2427
subnetwork = google_compute_subnetwork.main.name
2528
ip_range_pods = google_compute_subnetwork.main.secondary_ip_range[0].range_name
2629
ip_range_services = google_compute_subnetwork.main.secondary_ip_range[1].range_name
27-
compute_engine_service_account = var.compute_engine_service_accounts[0]
30+
compute_engine_service_account = var.compute_engine_service_accounts[local.cluster_index]
2831
}
2932

test/fixtures/deploy_service/network.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2018-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ resource "random_string" "suffix" {
2121
}
2222

2323
provider "google" {
24-
project = var.project_ids[0]
24+
project = var.project_ids[local.cluster_index]
2525
}
2626

2727
resource "google_compute_network" "main" {

test/fixtures/simple_regional_with_gateway_api/outputs.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2018-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -83,3 +83,11 @@ output "service_account" {
8383
output "registry_project_ids" {
8484
value = var.registry_project_ids
8585
}
86+
87+
output "random_string" {
88+
value = random_string.suffix.result
89+
}
90+
91+
output "compute_engine_service_account" {
92+
value = var.compute_engine_service_accounts[local.cluster_index]
93+
}

test/fixtures/simple_regional_with_ipv6/outputs.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2018-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -83,3 +83,11 @@ output "service_account" {
8383
output "registry_project_ids" {
8484
value = var.registry_project_ids
8585
}
86+
87+
output "random_string" {
88+
value = random_string.suffix.result
89+
}
90+
91+
output "compute_engine_service_account" {
92+
value = var.compute_engine_service_accounts[local.cluster_index]
93+
}

test/fixtures/stub_domains_upstream_nameservers/example.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2018-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,6 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17+
locals {
18+
compute_engine_service_account = var.compute_engine_service_accounts[1]
19+
}
20+
1721
module "example" {
1822
source = "../../../examples/stub_domains_upstream_nameservers"
1923

@@ -24,6 +28,6 @@ module "example" {
2428
subnetwork = google_compute_subnetwork.main.name
2529
ip_range_pods = google_compute_subnetwork.main.secondary_ip_range[0].range_name
2630
ip_range_services = google_compute_subnetwork.main.secondary_ip_range[1].range_name
27-
compute_engine_service_account = var.compute_engine_service_accounts[1]
31+
compute_engine_service_account = local.compute_engine_service_account
2832
}
2933

test/fixtures/stub_domains_upstream_nameservers/outputs.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2018-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -56,3 +56,11 @@ output "service_account" {
5656
description = "The service account to default running nodes as if not overridden in `node_pools`."
5757
value = module.example.service_account
5858
}
59+
60+
output "random_string" {
61+
value = random_string.suffix.result
62+
}
63+
64+
output "compute_engine_service_account" {
65+
value = local.compute_engine_service_account
66+
}

test/fixtures/workload_metadata_config/outputs.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2018 Google LLC
2+
* Copyright 2018-2025 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -56,3 +56,12 @@ output "service_account" {
5656
description = "The service account to default running nodes as if not overridden in `node_pools`."
5757
value = module.example.service_account
5858
}
59+
60+
output "random_string" {
61+
value = random_string.suffix.result
62+
}
63+
64+
output "registry_project_ids" {
65+
description = "Projects to use for granting access to GCR registries, if requested"
66+
value = var.registry_project_ids
67+
}

test/integration/beta_cluster/testdata/TestBetaCluster.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
"clusterIpv4Cidr": "192.168.0.0/18",
6161
"clusterIpv4CidrBlock": "192.168.0.0/18",
6262
"clusterSecondaryRangeName": "cft-gke-test-pods-qwc4",
63-
"defaultPodIpv4RangeUtilization": 0.0156,
6463
"podCidrOverprovisionConfig": {},
6564
"servicesIpv4Cidr": "192.168.64.0/18",
6665
"servicesIpv4CidrBlock": "192.168.64.0/18",

0 commit comments

Comments
 (0)