Skip to content

Commit 9fbb6b0

Browse files
committed
test fixes
1 parent ff122fc commit 9fbb6b0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

mmv1/templates/terraform/samples/base_configs/test_file.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ import (
2727
"testing"
2828

2929
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
30-
"github.com/hashicorp/terraform-plugin-testing/plancheck"
3130
{{- if not $.Res.ExcludeDelete }}
3231
"github.com/hashicorp/terraform-plugin-testing/terraform"
3332
{{- end }}
3433

3534
"{{ $.ImportPath }}/acctest"
35+
"{{ $.ImportPath }}/envvar"
3636
"{{ $.ImportPath }}/tpgresource"
3737
transport_tpg "{{ $.ImportPath }}/transport"
3838
)

mmv1/third_party/terraform/acctest/resource_inventory_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ func TestValidateResourceMetadata(t *testing.T) {
268268
if r.ApiVersion == "" && resourceName != "google_biglake_iceberg_catalog" {
269269
t.Errorf("%s: `api_version` is required and not set", r.Resource)
270270
}
271+
272+
// Allowlist google_biglake_iceberg_namespace as a pre-existing case. I believe
273+
// that's a mistake which should be corrected at some point in the future.
274+
if r.ApiVersion == "" && resourceName != "google_biglake_iceberg_namespace" {
275+
t.Errorf("%s: `api_version` is required and not set", r.Resource)
276+
}
271277
if r.ApiResourceTypeKind == "" {
272278
t.Errorf("%s: `api_resource_type_kind` is required and not set", r.Resource)
273279
}

0 commit comments

Comments
 (0)