Skip to content

Commit 9e5e334

Browse files
committed
update for bpt 1.17
1 parent 0bff530 commit 9e5e334

File tree

4 files changed

+6
-90
lines changed

4 files changed

+6
-90
lines changed

test/integration/node_pool/node_pool_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ import (
1818
"testing"
1919
"time"
2020

21+
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/cai"
2122
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/gcloud"
2223
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/golden"
2324
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/tft"
2425
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/utils"
2526
"github.com/gruntwork-io/terratest/modules/k8s"
2627
"github.com/stretchr/testify/assert"
2728
"github.com/terraform-google-modules/terraform-google-kubernetes-engine/test/integration/testutils"
28-
gkeutils "github.com/terraform-google-modules/terraform-google-kubernetes-engine/test/integration/utils"
2929
)
3030

3131
func TestNodePool(t *testing.T) {
@@ -36,15 +36,15 @@ func TestNodePool(t *testing.T) {
3636
bpt.DefineVerify(func(assert *assert.Assertions) {
3737
// Skipping Default Verify as the Verify Stage fails due to change in Client Cert Token
3838
// bpt.DefaultVerify(assert)
39-
gkeutils.TGKEVerify(t, bpt, assert) // Verify Resources
39+
testutils.TGKEVerify(t, bpt, assert) // Verify Resources
4040

4141
projectId := bpt.GetStringOutput("project_id")
4242
location := bpt.GetStringOutput("location")
4343
clusterName := bpt.GetStringOutput("cluster_name")
4444

4545
// CAI
4646
clusterResourceName := fmt.Sprintf("//container.googleapis.com/projects/%s/locations/%s/clusters/%s", projectId, location, clusterName)
47-
cluster := gkeutils.GetProjectResources(t, projectId, gkeutils.WithAssetTypes([]string{"container.googleapis.com/Cluster"})).Get("#(name=\"" + clusterResourceName + "\").resource.data")
47+
cluster := cai.GetProjectResources(t, projectId, cai.WithAssetTypes([]string{"container.googleapis.com/Cluster"})).Get("#(name=\"" + clusterResourceName + "\").resource.data")
4848

4949
// Equivalent gcloud describe command
5050
// cluster := gcloud.Runf(t, "container clusters describe %s --zone %s --project %s", clusterName, location, projectId)
@@ -186,7 +186,7 @@ func TestNodePool(t *testing.T) {
186186
k8sOpts := k8s.KubectlOptions{}
187187
clusterNodesOp, err := k8s.RunKubectlAndGetOutputE(t, &k8sOpts, "get", "nodes", "-o", "json")
188188
assert.NoError(err)
189-
clusterNodes := testutils.ParseKubectlJSONResult(t, clusterNodesOp)
189+
clusterNodes := utils.ParseKubectlJSONResult(t, clusterNodesOp)
190190
assert.JSONEq(`[
191191
{
192192
"effect": "PreferNoSchedule",

test/integration/safer_cluster_iap_bastion/safer_cluster_iap_bastion_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/tft"
2424
"github.com/stretchr/testify/assert"
2525
"github.com/terraform-google-modules/terraform-google-kubernetes-engine/test/integration/testutils"
26-
gkeutils "github.com/terraform-google-modules/terraform-google-kubernetes-engine/test/integration/utils"
2726
)
2827

2928
func TestSaferClusterIapBastion(t *testing.T) {
@@ -34,7 +33,7 @@ func TestSaferClusterIapBastion(t *testing.T) {
3433
bpt.DefineVerify(func(assert *assert.Assertions) {
3534
// Skipping Default Verify as the Verify Stage fails due to change in Client Cert Token
3635
// bpt.DefaultVerify(assert)
37-
gkeutils.TGKEVerify(t, bpt, assert) // Verify Resources
36+
testutils.TGKEVerify(t, bpt, assert) // Verify Resources
3837

3938
test_command, _ := strings.CutPrefix(bpt.GetStringOutput("test_command"), "gcloud ")
4039

test/integration/utils/cai.go

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

test/integration/workload_identity/workload_identity_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import (
2222
"github.com/GoogleCloudPlatform/cloud-foundation-toolkit/infra/blueprint-test/pkg/tft"
2323
"github.com/stretchr/testify/assert"
2424
"github.com/terraform-google-modules/terraform-google-kubernetes-engine/test/integration/testutils"
25-
gkeutils "github.com/terraform-google-modules/terraform-google-kubernetes-engine/test/integration/utils"
2625
)
2726

2827
func TestWorkloadIdentity(t *testing.T) {
@@ -33,7 +32,7 @@ func TestWorkloadIdentity(t *testing.T) {
3332
bpt.DefineVerify(func(assert *assert.Assertions) {
3433
// Skipping Default Verify as the Verify Stage fails due to change in Client Cert Token
3534
// bpt.DefaultVerify(assert)
36-
gkeutils.TGKEVerify(t, bpt, assert) // Verify Resources
35+
testutils.TGKEVerify(t, bpt, assert) // Verify Resources
3736

3837
projectId := bpt.GetStringOutput("project_id")
3938
location := bpt.GetStringOutput("location")

0 commit comments

Comments
 (0)