Skip to content

Commit 4761570

Browse files
authored
chore: update for new nodeImageConfig block (#2599)
1 parent dd97ce5 commit 4761570

11 files changed

Lines changed: 77 additions & 15 deletions

File tree

test/integration/beta_cluster/beta_cluster_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ func TestBetaCluster(t *testing.T) {
4242
op := gcloud.Runf(t, "beta container clusters describe %s --zone %s --project %s", clusterName, location, projectId)
4343
// save output as goldenfile
4444
g := golden.NewOrUpdate(t, op.String(),
45-
golden.WithSanitizer(golden.StringSanitizer(serviceAccount, "SERVICE_ACCOUNT")),
46-
golden.WithSanitizer(golden.StringSanitizer(projectId, "PROJECT_ID")),
47-
golden.WithSanitizer(golden.StringSanitizer(clusterName, "CLUSTER_NAME")),
45+
golden.WithSanitizer(testutils.GKEClusterSanitizer(serviceAccount, projectId, clusterName, op)),
4846
)
4947
// assert json paths against goldenfile data
5048
validateJSONPaths := []string{

test/integration/beta_cluster/testdata/TestBetaCluster.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@
165165
"metadata": {
166166
"disable-legacy-endpoints": "true"
167167
},
168+
"nodeImageConfig": {
169+
"image": "NODE_IMAGE",
170+
"imageProject": "gke-node-images"
171+
},
168172
"oauthScopes": [
169173
"https://www.googleapis.com/auth/userinfo.email",
170174
"https://www.googleapis.com/auth/cloud-platform"
@@ -235,6 +239,10 @@
235239
"disable-legacy-endpoints": "true",
236240
"node_pool": "pool-01"
237241
},
242+
"nodeImageConfig": {
243+
"image": "NODE_IMAGE",
244+
"imageProject": "gke-node-images"
245+
},
238246
"oauthScopes": [
239247
"https://www.googleapis.com/auth/cloud-platform"
240248
],

test/integration/private_zonal_with_networking/private_zonal_with_networking_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ func TestPrivateZonalWithNetworking(t *testing.T) {
5151
op := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId)
5252

5353
g := golden.NewOrUpdate(t, op.String(),
54-
golden.WithSanitizer(golden.StringSanitizer(serviceAccount, "SERVICE_ACCOUNT")),
55-
golden.WithSanitizer(golden.StringSanitizer(projectId, "PROJECT_ID")),
56-
golden.WithSanitizer(golden.StringSanitizer(clusterName, "CLUSTER_NAME")),
54+
golden.WithSanitizer(testutils.GKEClusterSanitizer(serviceAccount, projectId, clusterName, op)),
5755
)
5856
assert.Equal(peeringName, op.Get("privateClusterConfig.peeringName").String(), "has the correct PeeringName")
5957
validateJSONPaths := []string{

test/integration/private_zonal_with_networking/testdata/TestPrivateZonalWithNetworking.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@
162162
"metadata": {
163163
"disable-legacy-endpoints": "true"
164164
},
165+
"nodeImageConfig": {
166+
"image": "NODE_IMAGE",
167+
"imageProject": "gke-node-images"
168+
},
165169
"oauthScopes": [
166170
"https://www.googleapis.com/auth/userinfo.email",
167171
"https://www.googleapis.com/auth/cloud-platform"
@@ -240,6 +244,10 @@
240244
"disable-legacy-endpoints": "true",
241245
"node_pool": "default-node-pool"
242246
},
247+
"nodeImageConfig": {
248+
"image": "NODE_IMAGE",
249+
"imageProject": "gke-node-images"
250+
},
243251
"oauthScopes": [
244252
"https://www.googleapis.com/auth/cloud-platform"
245253
],

test/integration/simple_regional/simple_regional_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ func TestSimpleRegional(t *testing.T) {
4040

4141
op := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId)
4242
g := golden.NewOrUpdate(t, op.String(),
43-
golden.WithSanitizer(golden.StringSanitizer(serviceAccount, "SERVICE_ACCOUNT")),
44-
golden.WithSanitizer(golden.StringSanitizer(projectId, "PROJECT_ID")),
45-
golden.WithSanitizer(golden.StringSanitizer(clusterName, "CLUSTER_NAME")),
43+
golden.WithSanitizer(testutils.GKEClusterSanitizer(serviceAccount, projectId, clusterName, op)),
4644
)
4745
validateJSONPaths := []string{
4846
"status",

test/integration/simple_regional/testdata/TestSimpleRegional.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@
175175
"metadata": {
176176
"disable-legacy-endpoints": "true"
177177
},
178+
"nodeImageConfig": {
179+
"image": "NODE_IMAGE",
180+
"imageProject": "gke-node-images"
181+
},
178182
"oauthScopes": [
179183
"https://www.googleapis.com/auth/userinfo.email",
180184
"https://www.googleapis.com/auth/cloud-platform"
@@ -252,6 +256,10 @@
252256
"disable-legacy-endpoints": "true",
253257
"node_pool": "default-node-pool"
254258
},
259+
"nodeImageConfig": {
260+
"image": "NODE_IMAGE",
261+
"imageProject": "gke-node-images"
262+
},
255263
"oauthScopes": [
256264
"https://www.googleapis.com/auth/cloud-platform"
257265
],

test/integration/simple_regional_additional_ip_ranges/simple_regional_additional_ip_ranges_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ func TestSimpleRegionalAdditionalIPRanges(t *testing.T) {
4040

4141
op := gcloud.Runf(t, "container clusters describe %s --region %s --project %s", clusterName, location, projectId)
4242
g := golden.NewOrUpdate(t, op.String(),
43-
golden.WithSanitizer(golden.StringSanitizer(serviceAccount, "SERVICE_ACCOUNT")),
44-
golden.WithSanitizer(golden.StringSanitizer(projectId, "PROJECT_ID")),
45-
golden.WithSanitizer(golden.StringSanitizer(clusterName, "CLUSTER_NAME")),
43+
golden.WithSanitizer(testutils.GKEClusterSanitizer(serviceAccount, projectId, clusterName, op)),
4644
)
4745
validateJSONPaths := []string{
4846
"status",

test/integration/simple_regional_additional_ip_ranges/testdata/TestSimpleRegionalAdditionalIPRanges.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@
174174
"metadata": {
175175
"disable-legacy-endpoints": "true"
176176
},
177+
"nodeImageConfig": {
178+
"image": "NODE_IMAGE",
179+
"imageProject": "gke-node-images"
180+
},
177181
"oauthScopes": [
178182
"https://www.googleapis.com/auth/userinfo.email",
179183
"https://www.googleapis.com/auth/cloud-platform"
@@ -251,6 +255,10 @@
251255
"disable-legacy-endpoints": "true",
252256
"node_pool": "default-node-pool"
253257
},
258+
"nodeImageConfig": {
259+
"image": "NODE_IMAGE",
260+
"imageProject": "gke-node-images"
261+
},
254262
"oauthScopes": [
255263
"https://www.googleapis.com/auth/cloud-platform"
256264
],

test/integration/simple_regional_cluster_autoscaling/simple_regional_cluster_autoscaling_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ func TestSimpleRegionalClusterAutoscaling(t *testing.T) {
3737

3838
op := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId)
3939
g := golden.NewOrUpdate(t, op.String(),
40-
golden.WithSanitizer(golden.StringSanitizer(serviceAccount, "SERVICE_ACCOUNT")),
41-
golden.WithSanitizer(golden.StringSanitizer(projectId, "PROJECT_ID")),
42-
golden.WithSanitizer(golden.StringSanitizer(clusterName, "CLUSTER_NAME")),
40+
golden.WithSanitizer(testutils.GKEClusterSanitizer(serviceAccount, projectId, clusterName, op)),
4341
)
4442
validateJSONPaths := []string{
4543
"location",

test/integration/simple_regional_cluster_autoscaling/testdata/TestSimpleRegionalClusterAutoscaling.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@
167167
"metadata": {
168168
"disable-legacy-endpoints": "true"
169169
},
170+
"nodeImageConfig": {
171+
"image": "NODE_IMAGE",
172+
"imageProject": "gke-node-images"
173+
},
170174
"oauthScopes": [
171175
"https://www.googleapis.com/auth/userinfo.email",
172176
"https://www.googleapis.com/auth/cloud-platform"
@@ -244,6 +248,10 @@
244248
"disable-legacy-endpoints": "true",
245249
"node_pool": "default-node-pool"
246250
},
251+
"nodeImageConfig": {
252+
"image": "NODE_IMAGE",
253+
"imageProject": "gke-node-images"
254+
},
247255
"oauthScopes": [
248256
"https://www.googleapis.com/auth/cloud-platform"
249257
],

0 commit comments

Comments
 (0)