Skip to content

Commit

Permalink
Skip instance migrate tests, they handle config directly (#3554)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
slevenick authored May 27, 2020
1 parent bd27a0d commit 217d0be
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand All @@ -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))
Expand Down
10 changes: 10 additions & 0 deletions third_party/terraform/tests/resource_bigtable_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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))
Expand All @@ -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))
Expand All @@ -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))
Expand All @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 217d0be

Please sign in to comment.