CloudMonitoring: Fix INT64 label unmarshal error (#39441)

This commit is contained in:
Benedikt Spellmeyer
2021-09-22 17:05:36 +02:00
committed by GitHub
parent c75737c808
commit f76a11c955
4 changed files with 13 additions and 8 deletions

View File

@@ -942,7 +942,7 @@ func TestCloudMonitoring(t *testing.T) {
query := &cloudMonitoringTimeSeriesQuery{
ProjectName: "test-proj",
Query: "test-query",
AliasBy: "{{project}} - {{resource.label.zone}} - {{resource.label.instance_id}}",
AliasBy: "{{project}} - {{resource.label.zone}} - {{resource.label.instance_id}} - {{metric.label.response_code_class}}",
timeRange: plugins.DataTimeRange{
From: fmt.Sprintf("%v", fromStart.Unix()*1000),
To: fmt.Sprintf("%v", fromStart.Add(34*time.Minute).Unix()*1000),
@@ -952,7 +952,7 @@ func TestCloudMonitoring(t *testing.T) {
require.NoError(t, err)
frames, err := res.Dataframes.Decoded()
require.NoError(t, err)
assert.Equal(t, "test-proj - asia-northeast1-c - 6724404429462225363", frames[0].Fields[1].Name)
assert.Equal(t, "test-proj - asia-northeast1-c - 6724404429462225363 - 200", frames[0].Fields[1].Name)
})
})
})