Cloudwatch: Remove core imports from infra/log (#81543)
* Cloudwatch: use logging from plugin-sdk-go instead of infra/log * Add a link to the TODO issue for moving `instrumentContext`
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/grafana/grafana-plugin-sdk-go/backend/log"
|
||||
"github.com/grafana/grafana/pkg/tsdb/cloudwatch/models"
|
||||
)
|
||||
|
||||
@@ -26,13 +27,13 @@ func TestMetricDataInputBuilder(t *testing.T) {
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
executor := newExecutor(nil, &fakeSessionCache{})
|
||||
executor := newExecutor(nil, &fakeSessionCache{}, log.NewNullLogger())
|
||||
query := getBaseQuery()
|
||||
query.TimezoneUTCOffset = tc.timezoneUTCOffset
|
||||
|
||||
from := now.Add(time.Hour * -2)
|
||||
to := now.Add(time.Hour * -1)
|
||||
mdi, err := executor.buildMetricDataInput(logger, from, to, []*models.CloudWatchQuery{query})
|
||||
mdi, err := executor.buildMetricDataInput(from, to, []*models.CloudWatchQuery{query})
|
||||
|
||||
assert.NoError(t, err)
|
||||
require.NotNil(t, mdi)
|
||||
|
||||
Reference in New Issue
Block a user