Skip to content

Commit

Permalink
just trying stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
brookesargent committed Nov 21, 2024
1 parent 6aa970b commit a6bb9ec
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions internal/provider/webhook_recipient_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,19 @@ resource "honeycombio_webhook_recipient" "test" {
t.Run("happy path custom webhook", func(t *testing.T) {
name := test.RandomStringWithPrefix("test.", 20)
url := test.RandomURL()
body := `<<EOT
createBody := `<<EOT
{
"name": " {{ .Name }}",
"id": " {{ .ID }}",
"description": " {{ .Description }}",
}
EOT`
updateBody := `<<EOT
{
"name": " {{ .Name }}",
"id": " {{ .ID }}"
}
EOT`

resource.Test(t, resource.TestCase{
PreCheck: testAccPreCheck(t),
Expand All @@ -88,7 +94,7 @@ resource "honeycombio_webhook_recipient" "test" {
type = "trigger"
body = %s
}
}`, name, url, body),
}`, name, url, createBody),
Check: resource.ComposeAggregateTestCheckFunc(
testAccEnsureRecipientExists(t, "honeycombio_webhook_recipient.test"),
resource.TestCheckResourceAttrSet("honeycombio_webhook_recipient.test", "id"),
Expand All @@ -111,7 +117,7 @@ resource "honeycombio_webhook_recipient" "test" {
type = "trigger"
body = %s
}
}`, name, url, body),
}`, name, url, updateBody),
Check: resource.ComposeAggregateTestCheckFunc(
testAccEnsureRecipientExists(t, "honeycombio_webhook_recipient.test"),
resource.TestCheckResourceAttrSet("honeycombio_webhook_recipient.test", "id"),
Expand Down

0 comments on commit a6bb9ec

Please sign in to comment.