Skip to content

Commit

Permalink
fix field specification and add a VCR skip for the new acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
wj-chen committed Aug 8, 2023
1 parent b56cb63 commit 52cbc9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ func ResourceBigQueryTable() *schema.Resource {
// Schema: Optional] The schema for the data.
// Schema is required for CSV and JSON formats if autodetect is not on.
// Schema is disallowed for Google Cloud Bigtable, Cloud Datastore backups, Avro, Iceberg, ORC, and Parquet formats.
// Schema is mutually exclusive with View and Materialized View.
"schema": {
Type: schema.TypeString,
Optional: true,
Expand All @@ -503,8 +502,7 @@ func ResourceBigQueryTable() *schema.Resource {
json, _ := structure.NormalizeJsonString(v)
return json
},
Description: `A JSON schema for the external table. Schema is required for CSV and JSON formats and is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats when using external tables.`,
ConflictsWith: []string{"view", "materialized_view"},
Description: `A JSON schema for the external table. Schema is required for CSV and JSON formats and is disallowed for Google Cloud Bigtable, Cloud Datastore backups, and Avro formats when using external tables.`,
},
// CsvOptions: [Optional] Additional properties to set if
// sourceFormat is set to CSV.
Expand Down Expand Up @@ -763,6 +761,7 @@ func ResourceBigQueryTable() *schema.Resource {
},

// Schema: [Optional] Describes the schema of this table.
// Schema is mutually exclusive with View and Materialized View.
"schema": {
Type: schema.TypeString,
Optional: true,
Expand All @@ -774,6 +773,7 @@ func ResourceBigQueryTable() *schema.Resource {
},
DiffSuppressFunc: bigQueryTableSchemaDiffSuppress,
Description: `A JSON schema for the table.`,
ConflictsWith: []string{"view", "materialized_view"},
},
// View: [Optional] If specified, configures this table as a view.
// View is mutually exclusive with Schema and Materialized View.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,8 @@ func TestAccBigQueryTable_MaterializedView_DailyTimePartioning_Update(t *testing

func TestAccBigQueryTable_MaterializedView_WithSchema(t *testing.T) {
t.Parallel()
// Pending VCR support in https://github.com/hashicorp/terraform-provider-google/issues/15427.
acctest.SkipIfVcr(t)

datasetID := fmt.Sprintf("tf_test_%s", RandString(t, 10))
tableID := fmt.Sprintf("tf_test_%s", RandString(t, 10))
Expand Down Expand Up @@ -977,7 +979,7 @@ func TestAccBigQueryTable_emptySchema(t *testing.T) {

func TestAccBigQueryTable_invalidSchemas(t *testing.T) {
t.Parallel()
// Not an acceptance test.
// Pending VCR support in https://github.com/hashicorp/terraform-provider-google/issues/15427.
acctest.SkipIfVcr(t)

datasetID := fmt.Sprintf("tf_test_%s", RandString(t, 10))
Expand Down

0 comments on commit 52cbc9c

Please sign in to comment.