Skip to content

Commit

Permalink
Fix TestAccEventarcGoogleChannelConfig_cryptoKeyUpdate to properly cl…
Browse files Browse the repository at this point in the history
  • Loading branch information
roaks3 authored and ericayyliu committed Jul 26, 2023
1 parent e3e8cc9 commit 7d94911
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ func TestAccEventarcGoogleChannelConfig_cryptoKeyUpdate(t *testing.T) {
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccEventarcGoogleChannelConfig_deleteCryptoKey(context),
},
},
})
}
Expand Down Expand Up @@ -153,6 +156,16 @@ resource "google_eventarc_google_channel_config" "primary" {
`, context)
}

func testAccEventarcGoogleChannelConfig_deleteCryptoKey(context map[string]interface{}) string {
return Nprintf(`
resource "google_eventarc_google_channel_config" "primary" {
location = "%{region}"
name = "projects/%{project_name}/locations/%{region}/googleChannelConfig"
crypto_key_name = ""
}
`, context)
}

func testAccCheckEventarcGoogleChannelConfigDestroyProducer(t *testing.T) func(s *terraform.State) error {
return func(s *terraform.State) error {
for name, rs := range s.RootModule().Resources {
Expand Down

0 comments on commit 7d94911

Please sign in to comment.