@@ -42,12 +42,12 @@ func TestNodePool(t *testing.T) {
4242
4343 //cluster := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId)
4444 clusterResourceName := fmt .Sprintf ("//container.googleapis.com/projects/%s/locations/%s/clusters/%s" , projectId , location , clusterName )
45- cluster := gkeutils .GetProjectResources (t , projectId , gkeutils .WithAssetType ( "container.googleapis.com/Cluster" )).Get ("#(name=\" " + clusterResourceName + "\" ).resource.data" )
45+ cluster := gkeutils .GetProjectResources (t , projectId , gkeutils .WithAssetTypes ([] string { "container.googleapis.com/Cluster" } )).Get ("#(name=\" " + clusterResourceName + "\" ).resource.data" )
4646
4747 // Cluster
4848 assert .Contains ([]string {"RUNNING" , "RECONCILING" }, cluster .Get ("status" ).String (), "Cluster is Running" )
4949 assert .Equal ("COS_CONTAINERD" , cluster .Get ("autoscaling.autoprovisioningNodePoolDefaults.imageType" ).String (), "has the expected image type" )
50- assert .Equal ("[ \n \" https://www.googleapis.com/auth/cloud-platform\" \n ]" , cluster .Get ("autoscaling.autoprovisioningNodePoolDefaults.oauthScopes" ).String (), "has the expected oauth scopes" )
50+ assert .Equal ("https://www.googleapis.com/auth/cloud-platform" , cluster .Get ("autoscaling.autoprovisioningNodePoolDefaults.oauthScopes.1 " ).String (), "has the expected oauth scopes" )
5151 assert .Equal ("default" , cluster .Get ("autoscaling.autoprovisioningNodePoolDefaults.serviceAccount" ).String (), "has the expected service account" )
5252 assert .Equal ("OPTIMIZE_UTILIZATION" , cluster .Get ("autoscaling.autoscalingProfile" ).String (), "has the expected autoscaling profile" )
5353 assert .True (cluster .Get ("autoscaling.enableNodeAutoprovisioning" ).Bool (), "has the expected node autoprovisioning" )
@@ -148,6 +148,11 @@ func TestNodePool(t *testing.T) {
148148 "effect": "PreferNoSchedule",
149149 "key": "all-pools-example",
150150 "value": "true"
151+ },
152+ {
153+ "effect": "NoSchedule",
154+ "key": "nvidia.com/gpu",
155+ "value": "present"
151156 }
152157 ]` ,
153158 clusterNodes .Get ("items.#(metadata.labels.node_pool==\" pool-02\" ).spec.taints" ).String (), "has the expected all-pools-example taint" )
@@ -156,6 +161,11 @@ func TestNodePool(t *testing.T) {
156161 "effect": "PreferNoSchedule",
157162 "key": "all-pools-example",
158163 "value": "true"
164+ },
165+ {
166+ "effect": "NoSchedule",
167+ "key": "sandbox.gke.io/runtime",
168+ "value": "gvisor"
159169 }
160170 ]` ,
161171 clusterNodes .Get ("items.#(metadata.labels.node_pool==\" pool-03\" ).spec.taints" ).String (), "has the expected all-pools-example taint" )
0 commit comments