File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
fixtures/safer_cluster_iap_bastion Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 1515 */
1616
1717locals {
18- test_command = " gcloud beta compute ssh ${ module . example . bastion_name } --tunnel-through-iap --verbosity=error --project ${ var . project_ids [1 ]} --zone ${ module . example . bastion_zone } -q -- curl -sS https://${ module . example . endpoint } /version -k"
18+ test_command = " gcloud beta compute ssh ${ module . example . bastion_name } --tunnel-through-iap --verbosity=error --project ${ var . project_ids [1 ]} --zone ${ module . example . bastion_zone } -q --command=' curl -sS https://${ module . example . endpoint } /version -k' "
1919}
2020
2121module "example" {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
2121 "github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/gcloud"
2222 "github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/golden"
2323 "github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/tft"
24+ "github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/utils"
2425 "github.com/gruntwork-io/terratest/modules/k8s"
2526 "github.com/stretchr/testify/assert"
2627 "github.com/terraform-google-modules/terraform-google-kubernetes-engine/test/integration/testutils"
@@ -92,6 +93,11 @@ func TestNodePool(t *testing.T) {
9293 g .JSONEq (assert , cluster , pth )
9394 }
9495
96+ // Test validating all Paths
97+ evalPaths := utils .GetJSONPaths (cluster )
98+ fmt .Println (evalPaths )
99+ g .JSONPathEqs (assert , cluster , evalPaths )
100+
95101 // Pool-01
96102 assert .Equal ("pool-01" , cluster .Get ("nodePools.#(name==\" pool-01\" ).name" ).String (), "pool-1 exists" )
97103 assert .Equal ("e2-medium" , cluster .Get ("nodePools.#(name==\" pool-01\" ).config.machineType" ).String (), "is the expected machine type" )
You can’t perform that action at this time.
0 commit comments