Skip to content

Commit

Permalink
validate bug report with failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
jharley committed Jul 31, 2023
1 parent 957dbdd commit 467e603
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions internal/provider/trigger_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,39 @@ resource "honeycombio_trigger" "test" {
})
}

func TestAcc_TriggerResourceThresholdFloatingPointBug(t *testing.T) {
// reported as https://github.com/honeycombio/terraform-provider-honeycombio/issues/335
resource.Test(t, resource.TestCase{
PreCheck: testAccPreCheck(t),
ProtoV5ProviderFactories: testAccProtoV5MuxServerFactory,
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
data "honeycombio_query_specification" "test" {
calculation {
op = "COUNT"
}
time_range = 1200
}
resource "honeycombio_trigger" "test" {
name = "floating point test"
dataset = "%s"
query_id = data.honeycombio_query_specification.test.id
threshold {
op = ">"
value = 1 - 0.99
}
}
`, testAccDataset()),
},
},
})
}

func testAccConfigBasicTriggerTest(dataset, pdseverity string) string {
return fmt.Sprintf(`
data "honeycombio_query_specification" "test" {
Expand Down

0 comments on commit 467e603

Please sign in to comment.