Skip to content

Commit

Permalink
fix logs
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
  • Loading branch information
jkroepke committed Jul 13, 2024
1 parent 12762c3 commit 8a8dac3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/plugin/internal/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestGrafanaClientFetchesDashboard(t *testing.T) {
t.Skip("Chrome not found. Skipping test")
}

chromeInstance, err := chrome.NewLocalBrowserInstance(context.Background(), log.DefaultLogger, true)
chromeInstance, err := chrome.NewLocalBrowserInstance(context.Background(), log.NewNullLogger(), true)

Convey("When fetching a Dashboard", t, func() {
var requestURI []string
Expand All @@ -49,7 +49,7 @@ func TestGrafanaClientFetchesDashboard(t *testing.T) {
Layout: "simple",
DashboardMode: "default",
}
grf := New(log.DefaultLogger, conf, &testClient, chromeInstance, ts.URL, credential, url.Values{})
grf := New(log.NewNullLogger(), conf, &testClient, chromeInstance, ts.URL, credential, url.Values{})
_, err := grf.Dashboard(context.Background(), "rYy7Paekz")

Convey("It should receive no errors", func() {
Expand Down Expand Up @@ -91,7 +91,7 @@ func TestGrafanaClientFetchesPanelPNG(t *testing.T) {
pngEndpoint string
}{
"httpClient": {
New(log.DefaultLogger, conf, &testClient, nil, ts.URL, credential, variables),
New(log.NewNullLogger(), conf, &testClient, nil, ts.URL, credential, variables),
"/render/d-solo/testDash/_",
},
}
Expand Down Expand Up @@ -141,7 +141,7 @@ func TestGrafanaClientFetchesPanelPNG(t *testing.T) {
pngEndpoint string
}{
"httpClient": {
New(log.DefaultLogger, conf, &testClient, nil, ts.URL, credential, variables),
New(log.NewNullLogger(), conf, &testClient, nil, ts.URL, credential, variables),
"/render/d-solo/testDash/_",
},
}
Expand Down Expand Up @@ -176,7 +176,7 @@ func TestGrafanaClientFetchPanelPNGErrorHandling(t *testing.T) {
}))
defer ts.Close()

grf := New(log.DefaultLogger, &config.Config{}, &testClient, nil, ts.URL, Credential{}, url.Values{})
grf := New(log.NewNullLogger(), &config.Config{}, &testClient, nil, ts.URL, Credential{}, url.Values{})

_, err := grf.PanelPNG(context.Background(), "testDash",
dashboard.Panel{ID: 44, Type: "singlestat", Title: "title", GridPos: dashboard.GridPos{}},
Expand All @@ -194,7 +194,7 @@ func TestGrafanaClientFetchPanelPNGErrorHandling(t *testing.T) {
}))
defer ts.Close()

grf := New(log.DefaultLogger, &config.Config{}, &testClient, nil, ts.URL, Credential{}, url.Values{})
grf := New(log.NewNullLogger(), &config.Config{}, &testClient, nil, ts.URL, Credential{}, url.Values{})

_, err := grf.PanelPNG(context.Background(), "testDash",
dashboard.Panel{ID: 44, Type: "singlestat", Title: "title", GridPos: dashboard.GridPos{}},
Expand Down

0 comments on commit 8a8dac3

Please sign in to comment.