test(bigtable): modify CI Encryption Key Name used by TestIntegration_AdminEncryptionInfo (#5043)
#4173
Allow test to use later versions (not just v1)
Use a regional key as the other one is no longer regional.
diff --git a/bigtable/integration_test.go b/bigtable/integration_test.go
index f44f870..34e3548 100644
--- a/bigtable/integration_test.go
+++ b/bigtable/integration_test.go
@@ -1613,7 +1613,7 @@
t.Fatalf("Creating table: %v", err)
}
- encryptionKeyVersion := kmsKeyName + "/cryptoKeyVersions/1"
+ var encryptionKeyVersion string
// The encryption info can take 30-300s (currently about 120-190s) to
// become ready.
@@ -1623,8 +1623,8 @@
t.Fatalf("EncryptionInfo: %v", err)
}
- kmsKeyVersion := encryptionInfo[clusterID][0].KMSKeyVersion
- if kmsKeyVersion != "" {
+ encryptionKeyVersion = encryptionInfo[clusterID][0].KMSKeyVersion
+ if encryptionKeyVersion != "" {
break
}
diff --git a/internal/kokoro/continuous.sh b/internal/kokoro/continuous.sh
index 48e71a8..286f2cb 100755
--- a/internal/kokoro/continuous.sh
+++ b/internal/kokoro/continuous.sh
@@ -40,7 +40,7 @@
# Bigtable integration tests expect an existing instance and cluster
# ❯ cbt createinstance gc-bt-it-instance gc-bt-it-instance \
# gc-bt-it-cluster us-west1-b 1 SSD
-export GCLOUD_TESTS_BIGTABLE_KEYRING=projects/dulcet-port-762/locations/us-central1/keyRings/go-integration-test
+export GCLOUD_TESTS_BIGTABLE_KEYRING=projects/dulcet-port-762/locations/us-central1/keyRings/go-integration-test-regional
export GCLOUD_TESTS_BIGTABLE_CLUSTER="gc-bt-it-cluster"
export GCLOUD_TESTS_BIGTABLE_INSTANCE="gc-bt-it-instance"