Skip to content

Commit b4efb3a

Browse files
committed
* Add back the tag
* Remove check for equations
1 parent 3639f17 commit b4efb3a

File tree

1 file changed

+1
-56
lines changed

1 file changed

+1
-56
lines changed

internal/kibana/slo_test.go

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ func TestAccResourceSlo(t *testing.T) {
166166
name: sloName,
167167
indicatorType: "timeslice_metric_indicator",
168168
settingsEnabled: true,
169+
tags: []string{"tag-1", "another_tag"},
169170
}),
170171
Check: resource.ComposeTestCheckFunc(
171172
resource.TestCheckResourceAttr("elasticstack_kibana_slo.test_slo", "timeslice_metric_indicator.0.index", "my-index-"+sloName),
@@ -434,62 +435,6 @@ func TestAccResourceSlo_timeslice_metric_indicator_doc_count(t *testing.T) {
434435
})
435436
}
436437

437-
func TestAccResourceSlo_timeslice_metric_indicator_mismatched_equation(t *testing.T) {
438-
sloName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum)
439-
resource.Test(t, resource.TestCase{
440-
PreCheck: func() { acctest.PreCheck(t) },
441-
CheckDestroy: checkResourceSloDestroy,
442-
Steps: []resource.TestStep{
443-
{
444-
ProtoV6ProviderFactories: acctest.Providers,
445-
SkipFunc: versionutils.CheckIfVersionIsUnsupported(sloTimesliceMetricsMinVersion),
446-
Config: fmt.Sprintf(`
447-
provider "elasticstack" {
448-
elasticsearch {}
449-
kibana {}
450-
}
451-
452-
resource "elasticstack_elasticsearch_index" "my_index" {
453-
name = "my-index"
454-
deletion_protection = false
455-
}
456-
457-
resource "elasticstack_kibana_slo" "test_slo" {
458-
name = "%s"
459-
description = "mismatched metric/equation"
460-
timeslice_metric_indicator {
461-
index = "my-index"
462-
timestamp_field = "@timestamp"
463-
metric {
464-
metrics {
465-
name = "A"
466-
aggregation = "sum"
467-
field = "latency"
468-
}
469-
equation = "A + B"
470-
comparator = "GT"
471-
threshold = 100
472-
}
473-
}
474-
budgeting_method = "timeslices"
475-
objective {
476-
target = 0.95
477-
timeslice_target = 0.95
478-
timeslice_window = "5m"
479-
}
480-
time_window {
481-
duration = "7d"
482-
type = "rolling"
483-
}
484-
depends_on = [elasticstack_elasticsearch_index.my_index]
485-
}
486-
`, sloName),
487-
ExpectError: regexp.MustCompile(`.*B.*not defined.*`),
488-
},
489-
},
490-
})
491-
}
492-
493438
func TestAccResourceSlo_timeslice_metric_indicator_multiple_mixed_metrics(t *testing.T) {
494439
sloName := sdkacctest.RandStringFromCharSet(22, sdkacctest.CharSetAlphaNum)
495440
resource.Test(t, resource.TestCase{

0 commit comments

Comments
 (0)