diff --git a/.changelog/4844.txt b/.changelog/4844.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/4844.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google-beta/resource_bigquery_table_test.go b/google-beta/resource_bigquery_table_test.go index 2976e1aeae..90cb766275 100644 --- a/google-beta/resource_bigquery_table_test.go +++ b/google-beta/resource_bigquery_table_test.go @@ -916,20 +916,6 @@ func TestAccBigQueryDataTable_expandArray(t *testing.T) { }) } -func TestUnitBigQueryDataTable_schemaIsChangable(t *testing.T) { - t.Parallel() - for _, testcase := range testUnitBigQueryDataTableIsChangableTestCases { - testcase.check(t) - testcaseNested := &testUnitBigQueryDataTableJSONChangeableTestCase{ - testcase.name + "Nested", - fmt.Sprintf("[{\"name\": \"someValue\", \"type\" : \"INTEGER\", \"fields\" : %s }]", testcase.jsonOld), - fmt.Sprintf("[{\"name\": \"someValue\", \"type\" : \"INT64\", \"fields\" : %s }]", testcase.jsonNew), - testcase.changeable, - } - testcaseNested.check(t) - } -} - func TestAccBigQueryTable_allowDestroy(t *testing.T) { t.Parallel() @@ -1081,6 +1067,43 @@ var testUnitBigQueryDataTableIsChangableTestCases = []testUnitBigQueryDataTableJ jsonNew: "[{\"name\": \"value3\", \"type\" : \"BOOLEAN\", \"mode\" : \"NULLABLE\", \"description\" : \"newVal\" }, {\"name\": \"value1\", \"type\" : \"INTEGER\", \"mode\" : \"NULLABLE\", \"description\" : \"someVal\" }]", changeable: false, }, + { + name: "policyTags", + jsonOld: `[ + { + "mode": "NULLABLE", + "name": "providerphone", + "policyTags": { + "names": ["projects/my-project/locations/us/taxonomies/12345678/policyTags/12345678"] + }, + "type":"STRING" + } + ]`, + jsonNew: `[ + { + "name": "providerphone", + "type": "STRING", + "policyTags": { + "names": ["projects/my-project/locations/us/taxonomies/12345678/policyTags/12345678"] + } + } + ]`, + changeable: true, + }, +} + +func TestUnitBigQueryDataTable_schemaIsChangable(t *testing.T) { + t.Parallel() + for _, testcase := range testUnitBigQueryDataTableIsChangableTestCases { + testcase.check(t) + testcaseNested := &testUnitBigQueryDataTableJSONChangeableTestCase{ + testcase.name + "Nested", + fmt.Sprintf("[{\"name\": \"someValue\", \"type\" : \"INTEGER\", \"fields\" : %s }]", testcase.jsonOld), + fmt.Sprintf("[{\"name\": \"someValue\", \"type\" : \"INT64\", \"fields\" : %s }]", testcase.jsonNew), + testcase.changeable, + } + testcaseNested.check(t) + } } func testAccCheckBigQueryExtData(t *testing.T, expectedQuoteChar string) resource.TestCheckFunc {