From 5bdbde1256525aae91e839caca6fd2abb7074e41 Mon Sep 17 00:00:00 2001 From: Claus Matzinger Date: Tue, 7 Jan 2025 15:36:36 +0100 Subject: [PATCH] fix: e2m test --- .../resource_coralogix_events2metric_test.go | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/coralogix/resource_coralogix_events2metric_test.go b/coralogix/resource_coralogix_events2metric_test.go index 29f1cf4b..7bebedf8 100644 --- a/coralogix/resource_coralogix_events2metric_test.go +++ b/coralogix/resource_coralogix_events2metric_test.go @@ -197,6 +197,7 @@ logs_query = { metric_fields = { method = { + target_base_metric_name = "methodtwo" source_field = "duration" }, geo_point = { @@ -230,34 +231,35 @@ permutations = { func testAccCoralogixResourceSpans2Metric(l *events2MetricTestFields) string { return fmt.Sprintf(`resource "coralogix_events2metric" "test" { - name = "%s" - description = "%s" - spans_query = { +name = "%s" +description = "%s" +spans_query = { lucene = "remote_addr_enriched:/.*/" applications = ["nginx"] - actions = ["action-name"] - services = ["service-name"] - } + actions = ["action-name"] + services = ["service-name"] +} - metric_fields = { +metric_fields = { method = { - source_field = "duration" + target_base_metric_name = "methodtwo" + source_field = "duration" }, geo_point = { - source_field = "location_geopoint" - aggregations = { - max = { - enable = false - } - min = { - enable = false - } - avg = { - enable = true + source_field = "location_geopoint" + aggregations = { + max = { + enable = false + } + min = { + enable = false + } + avg = { + enable = true + } } - } } - } +} metric_labels = { Status = "status"