use logger context in cloudwatch (#57842)

This commit is contained in:
Yuriy Tseretyan
2022-11-02 10:14:02 -04:00
committed by GitHub
parent e3a4bde622
commit 3a5ddbfbdf
19 changed files with 93 additions and 92 deletions
@@ -10,6 +10,8 @@ import (
"github.com/grafana/grafana-plugin-sdk-go/backend"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/grafana/grafana/pkg/infra/log/logtest"
)
func TestCloudWatchQuery(t *testing.T) {
@@ -642,7 +644,7 @@ func Test_ParseMetricDataQueries_query_type_and_metric_editor_mode_and_GMD_query
require.NotNil(t, res[0])
assert.Equal(t, tc.expectedMetricQueryType, res[0].MetricQueryType)
assert.Equal(t, tc.expectedMetricEditorMode, res[0].MetricEditorMode)
assert.Equal(t, tc.expectedGMDApiMode, res[0].GetGMDAPIMode())
assert.Equal(t, tc.expectedGMDApiMode, res[0].GetGMDAPIMode(&logtest.Fake{}))
})
}
}