Skip to content

Commit

Permalink
CDPCP-12598 Skip CDW Hive test if env var is not set
Browse files Browse the repository at this point in the history
The acceptance test will be skipped until the dependent objects -
CDW cluster and database catalog - are properly allocated and awaited
by their respective tests.
  • Loading branch information
tevesz authored and gregito committed Aug 5, 2024
1 parent dbebfe8 commit af7a975
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions resources/dw/resource_hive_vw_acc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ type hiveTestParameters struct {
}

func HivePreCheck(t *testing.T) {
errMsg := "AWS Terraform acceptance testing requires environment variable %s to be set"
errMsg := "AWS CDW Hive Terraform acceptance testing requires environment variable %s to be set"
if _, ok := os.LookupEnv("CDW_CLUSTER_ID"); !ok {
t.Fatalf(errMsg, "CDW_CLUSTER_ID")
t.Skipf(errMsg, "CDW_CLUSTER_ID")
}
if _, ok := os.LookupEnv("CDW_DATABASE_CATALOG_ID"); !ok {
t.Fatalf(errMsg, "CDW_DATABASE_CATALOG_ID")
t.Skipf(errMsg, "CDW_DATABASE_CATALOG_ID")
}
}

Expand Down

0 comments on commit af7a975

Please sign in to comment.