Skip to content

Commit

Permalink
Fix TestAccEventarcGoogleChannelConfig_cryptoKeyUpdate to properly cl…
Browse files Browse the repository at this point in the history
…ean up (#7479) (#14025)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 17, 2023
1 parent 3d09609 commit aeec809
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/7479.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
13 changes: 13 additions & 0 deletions google/resource_eventarc_google_channel_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func TestAccEventarcGoogleChannelConfig_cryptoKeyUpdate(t *testing.T) {
ImportState: true,
ImportStateVerify: true,
},
{
Config: testAccEventarcGoogleChannelConfig_deleteCryptoKey(context),
},
},
})
}
Expand Down Expand Up @@ -152,6 +155,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 aeec809

Please sign in to comment.