From 217d0bedeb5ffde86b193dc6022802f52f166dad Mon Sep 17 00:00:00 2001 From: Sam Levenick Date: Wed, 27 May 2020 10:47:18 -0700 Subject: [PATCH] Skip instance migrate tests, they handle config directly (#3554) * Skip instance migrate tests, they handle config directly * Skip vcr for bigquery, it uses a client factory to produce new http clients on demand rather than using the shared client * Add note on bigtable instance --- .../tests/resource_bigtable_app_profile_test.go | 2 ++ .../tests/resource_bigtable_gc_policy_test.go | 4 ++++ .../tests/resource_bigtable_instance_iam_test.go | 6 ++++++ .../terraform/tests/resource_bigtable_instance_test.go | 8 ++++++++ .../terraform/tests/resource_bigtable_table_test.go | 10 ++++++++++ .../tests/resource_compute_instance_migrate_test.go | 2 ++ 6 files changed, 32 insertions(+) diff --git a/third_party/terraform/tests/resource_bigtable_app_profile_test.go b/third_party/terraform/tests/resource_bigtable_app_profile_test.go index 665095e5de98..96a2b758ac0b 100644 --- a/third_party/terraform/tests/resource_bigtable_app_profile_test.go +++ b/third_party/terraform/tests/resource_bigtable_app_profile_test.go @@ -8,6 +8,8 @@ import ( ) func TestAccBigtableAppProfile_update(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) diff --git a/third_party/terraform/tests/resource_bigtable_gc_policy_test.go b/third_party/terraform/tests/resource_bigtable_gc_policy_test.go index 367d2e94e1fa..bcb18dfe6804 100644 --- a/third_party/terraform/tests/resource_bigtable_gc_policy_test.go +++ b/third_party/terraform/tests/resource_bigtable_gc_policy_test.go @@ -10,6 +10,8 @@ import ( ) func TestAccBigtableGCPolicy_basic(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -33,6 +35,8 @@ func TestAccBigtableGCPolicy_basic(t *testing.T) { } func TestAccBigtableGCPolicy_union(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) diff --git a/third_party/terraform/tests/resource_bigtable_instance_iam_test.go b/third_party/terraform/tests/resource_bigtable_instance_iam_test.go index b5ae8846f1ee..20659c62d0df 100644 --- a/third_party/terraform/tests/resource_bigtable_instance_iam_test.go +++ b/third_party/terraform/tests/resource_bigtable_instance_iam_test.go @@ -8,6 +8,8 @@ import ( ) func TestAccBigtableInstanceIamBinding(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instance := "tf-bigtable-iam-" + randString(t, 10) @@ -51,6 +53,8 @@ func TestAccBigtableInstanceIamBinding(t *testing.T) { } func TestAccBigtableInstanceIamMember(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instance := "tf-bigtable-iam-" + randString(t, 10) @@ -89,6 +93,8 @@ func TestAccBigtableInstanceIamMember(t *testing.T) { } func TestAccBigtableInstanceIamPolicy(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instance := "tf-bigtable-iam-" + randString(t, 10) diff --git a/third_party/terraform/tests/resource_bigtable_instance_test.go b/third_party/terraform/tests/resource_bigtable_instance_test.go index 377fcbb3c932..a847b8016182 100644 --- a/third_party/terraform/tests/resource_bigtable_instance_test.go +++ b/third_party/terraform/tests/resource_bigtable_instance_test.go @@ -11,6 +11,8 @@ import ( ) func TestAccBigtableInstance_basic(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -47,6 +49,8 @@ func TestAccBigtableInstance_basic(t *testing.T) { } func TestAccBigtableInstance_cluster(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -101,6 +105,8 @@ func TestAccBigtableInstance_cluster(t *testing.T) { } func TestAccBigtableInstance_development(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -124,6 +130,8 @@ func TestAccBigtableInstance_development(t *testing.T) { } func TestAccBigtableInstance_allowDestroy(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) diff --git a/third_party/terraform/tests/resource_bigtable_table_test.go b/third_party/terraform/tests/resource_bigtable_table_test.go index 0fbf709f856b..490dd81d4287 100644 --- a/third_party/terraform/tests/resource_bigtable_table_test.go +++ b/third_party/terraform/tests/resource_bigtable_table_test.go @@ -10,6 +10,8 @@ import ( ) func TestAccBigtableTable_basic(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -33,6 +35,8 @@ func TestAccBigtableTable_basic(t *testing.T) { } func TestAccBigtableTable_splitKeys(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -57,6 +61,8 @@ func TestAccBigtableTable_splitKeys(t *testing.T) { } func TestAccBigtableTable_family(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -81,6 +87,8 @@ func TestAccBigtableTable_family(t *testing.T) { } func TestAccBigtableTable_familyMany(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) @@ -105,6 +113,8 @@ func TestAccBigtableTable_familyMany(t *testing.T) { } func TestAccBigtableTable_familyUpdate(t *testing.T) { + // bigtable instance does not use the shared HTTP client, this test creates an instance + skipIfVcr(t) t.Parallel() instanceName := fmt.Sprintf("tf-test-%s", randString(t, 10)) diff --git a/third_party/terraform/tests/resource_compute_instance_migrate_test.go b/third_party/terraform/tests/resource_compute_instance_migrate_test.go index 231a6dca5347..3790cc9e8b74 100644 --- a/third_party/terraform/tests/resource_compute_instance_migrate_test.go +++ b/third_party/terraform/tests/resource_compute_instance_migrate_test.go @@ -930,6 +930,8 @@ func cleanUpDisk(config *Config, diskName, zone string) { } func getInitializedConfig(t *testing.T) *Config { + // Migrate tests are non standard and handle the config directly + skipIfVcr(t) // Check that all required environment variables are set testAccPreCheck(t)