From abcd9f97c9299c45146c5b71d76690de57aedfdd Mon Sep 17 00:00:00 2001 From: Xin Date: Thu, 13 Feb 2020 18:41:26 -0500 Subject: [PATCH] Add tests for healthcare store pubsub topic removal (#3122) * Add tests for healthcare store pubsub topic removal. * Address code review comments. --- .../resource_healthcare_dicom_store_test.go.erb | 16 +++++++++++++--- .../resource_healthcare_fhir_store_test.go.erb | 8 ++++++++ .../resource_healthcare_hl7_v2_store_test.go.erb | 15 ++++++++++++--- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/third_party/terraform/tests/resource_healthcare_dicom_store_test.go.erb b/third_party/terraform/tests/resource_healthcare_dicom_store_test.go.erb index dcdb281cd2c5..4ae2b2dbbdc7 100644 --- a/third_party/terraform/tests/resource_healthcare_dicom_store_test.go.erb +++ b/third_party/terraform/tests/resource_healthcare_dicom_store_test.go.erb @@ -3,12 +3,13 @@ package google <% unless version == 'ga' -%> import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" "path" "strings" "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccHealthcareDicomStoreIdParsing(t *testing.T) { @@ -103,6 +104,15 @@ func TestAccHealthcareDicomStore_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + // TODO(b/148536607): Uncomment once b/148536607 is fixed. + // { + // Config: testGoogleHealthcareDicomStore_basic(dicomStoreName, datasetName), + // }, + // { + // ResourceName: resourceName, + // ImportState: true, + // ImportStateVerify: true, + // }, }, }) } diff --git a/third_party/terraform/tests/resource_healthcare_fhir_store_test.go.erb b/third_party/terraform/tests/resource_healthcare_fhir_store_test.go.erb index e471ee3e8b1f..740cc575e7cc 100644 --- a/third_party/terraform/tests/resource_healthcare_fhir_store_test.go.erb +++ b/third_party/terraform/tests/resource_healthcare_fhir_store_test.go.erb @@ -104,6 +104,14 @@ func TestAccHealthcareFhirStore_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testGoogleHealthcareFhirStore_basic(fhirStoreName, datasetName), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) } diff --git a/third_party/terraform/tests/resource_healthcare_hl7_v2_store_test.go.erb b/third_party/terraform/tests/resource_healthcare_hl7_v2_store_test.go.erb index ca5910dfa324..19c0f31ad2f6 100644 --- a/third_party/terraform/tests/resource_healthcare_hl7_v2_store_test.go.erb +++ b/third_party/terraform/tests/resource_healthcare_hl7_v2_store_test.go.erb @@ -3,12 +3,13 @@ package google <% unless version == 'ga' -%> import ( "fmt" - "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" - "github.com/hashicorp/terraform-plugin-sdk/helper/resource" - "github.com/hashicorp/terraform-plugin-sdk/terraform" "path" "strings" "testing" + + "github.com/hashicorp/terraform-plugin-sdk/helper/acctest" + "github.com/hashicorp/terraform-plugin-sdk/helper/resource" + "github.com/hashicorp/terraform-plugin-sdk/terraform" ) func TestAccHealthcareHl7V2StoreIdParsing(t *testing.T) { @@ -103,6 +104,14 @@ func TestAccHealthcareHl7V2Store_basic(t *testing.T) { ImportState: true, ImportStateVerify: true, }, + { + Config: testGoogleHealthcareHl7V2Store_basic(hl7_v2StoreName, datasetName), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, }, }) }