From bed2a3cd09daff8c3e5d10c6cb6514761b259f34 Mon Sep 17 00:00:00 2001 From: Weijia Chen Date: Fri, 2 Jun 2023 21:30:01 +0000 Subject: [PATCH] Enforce mutual exclusivity among view, materialized view, and schema in BigQuery table config --- .../tests/resource_bigquery_table_test.go | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/mmv1/third_party/terraform/tests/resource_bigquery_table_test.go b/mmv1/third_party/terraform/tests/resource_bigquery_table_test.go index 90012113b408..1bbbccc03472 100644 --- a/mmv1/third_party/terraform/tests/resource_bigquery_table_test.go +++ b/mmv1/third_party/terraform/tests/resource_bigquery_table_test.go @@ -367,8 +367,37 @@ func TestAccBigQueryTable_WithViewAndSchema(t *testing.T) { CheckDestroy: testAccCheckBigQueryTableDestroyProducer(t), Steps: []resource.TestStep{ { +<<<<<<< HEAD +<<<<<<< HEAD Config: testAccBigQueryTableWithViewAndSchema(datasetID, tableID, "table description"), ExpectError: regexp.MustCompile("\"view\": conflicts with schema"), +======= +<<<<<<< HEAD + Config: testAccBigQueryTableWithViewAndSchema(datasetID, tableID, "table description1"), + }, + { + ResourceName: "google_bigquery_table.test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection"}, + }, + { + Config: testAccBigQueryTableWithViewAndSchema(datasetID, tableID, "table description2"), + }, + { + ResourceName: "google_bigquery_table.test", + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"deletion_protection"}, +======= + Config: testAccBigQueryTableWithViewAndSchema(datasetID, tableID, "table description"), + ExpectError: regexp.MustCompile("\"view\": conflicts with schema"), +>>>>>>> 5471308bd (add ConflictsWith to resource_bigquery_table) +>>>>>>> 5a902d280 (Enforce mutual exclusivity among view, materialized view, and schema in BigQuery table config) +======= + Config: testAccBigQueryTableWithViewAndSchema(datasetID, tableID, "table description"), + ExpectError: regexp.MustCompile("\"view\": conflicts with schema"), +>>>>>>> b56cb632b (fix merge conflict) }, }, }) @@ -473,6 +502,14 @@ func TestAccBigQueryTable_MaterializedView_DailyTimePartioning_Update(t *testing }) } +<<<<<<< HEAD +<<<<<<< HEAD +======= +<<<<<<< HEAD +======= +>>>>>>> 5a902d280 (Enforce mutual exclusivity among view, materialized view, and schema in BigQuery table config) +======= +>>>>>>> b56cb632b (fix merge conflict) func TestAccBigQueryTable_MaterializedView_WithSchema(t *testing.T) { t.Parallel() @@ -515,6 +552,13 @@ func TestAccBigQueryTable_MaterializedView_WithView(t *testing.T) { }) } +<<<<<<< HEAD +<<<<<<< HEAD +======= +>>>>>>> 5471308bd (add ConflictsWith to resource_bigquery_table) +>>>>>>> 5a902d280 (Enforce mutual exclusivity among view, materialized view, and schema in BigQuery table config) +======= +>>>>>>> b56cb632b (fix merge conflict) func TestAccBigQueryExternalDataTable_parquet(t *testing.T) { t.Parallel()