From 5f8812cc354796760864aca60696662c0439a0b6 Mon Sep 17 00:00:00 2001 From: Pranav Sharma Date: Fri, 30 Jun 2023 00:11:12 +0000 Subject: [PATCH] Update test fixtures with additional cases --- .../metrics/boolean_gauge_metrics.json | 26 ++++++++ .../metrics/boolean_gauge_metrics_expect.json | 62 ++++++++++++++++++- 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics.json b/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics.json index 83774b61b..81002b66e 100644 --- a/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics.json +++ b/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics.json @@ -52,6 +52,32 @@ "startTimeUnixNano": "11651379494838206464", "timeUnixNano": "1687377293673694987", "asInt": "0" + }, + { + "attributes": [ + { + "key": "key", + "value": { + "stringValue": "value" + } + } + ], + "startTimeUnixNano": "1688083417576000000", + "timeUnixNano": "1688083820000000000", + "asInt": "393" + }, + { + "attributes": [ + { + "key": "key", + "value": { + "stringValue": "value" + } + } + ], + "startTimeUnixNano": "1688083940000000000", + "timeUnixNano": "1688084000000000000", + "asInt": "-272" } ] } diff --git a/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics_expect.json b/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics_expect.json index 3352d397d..ae39ca64b 100644 --- a/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics_expect.json +++ b/exporter/collector/integrationtest/testdata/fixtures/metrics/boolean_gauge_metrics_expect.json @@ -32,6 +32,66 @@ } ], "unit": "{gcp.BOOL}" + }, + { + "metric": { + "type": "workload.googleapis.com/observer-boolean-collector", + "labels": { + "key": "value", + "service_name": "unknown_service:sample" + } + }, + "resource": { + "type": "generic_node", + "labels": { + "location": "global", + "namespace": "", + "node_id": "" + } + }, + "metricKind": "GAUGE", + "valueType": "BOOL", + "points": [ + { + "interval": { + "endTime": "1970-01-01T00:00:00Z" + }, + "value": { + "boolValue": true + } + } + ], + "unit": "{gcp.BOOL}" + }, + { + "metric": { + "type": "workload.googleapis.com/observer-boolean-collector", + "labels": { + "key": "value", + "service_name": "unknown_service:sample" + } + }, + "resource": { + "type": "generic_node", + "labels": { + "location": "global", + "namespace": "", + "node_id": "" + } + }, + "metricKind": "GAUGE", + "valueType": "BOOL", + "points": [ + { + "interval": { + "endTime": "1970-01-01T00:00:00Z" + }, + "value": { + "boolValue": true + } + } + ], + "unit": "{gcp.BOOL}" } ] } @@ -79,7 +139,7 @@ "startTime": "1970-01-01T00:00:00Z" }, "value": { - "int64Value": "1" + "int64Value": "3" } } ]