mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
pkg/tsdb/elasticsearch/client/client_test.go: pass context.Background() instead of nil
See, $ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./... pkg/tsdb/elasticsearch/client/client_test.go:28:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck) pkg/tsdb/elasticsearch/client/client_test.go:39:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck) pkg/tsdb/elasticsearch/client/client_test.go:51:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck) pkg/tsdb/elasticsearch/client/client_test.go:63:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck) pkg/tsdb/elasticsearch/client/client_test.go:76:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck) pkg/tsdb/elasticsearch/client/client_test.go:89:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
This commit is contained in:
@@ -25,7 +25,7 @@ func TestClient(t *testing.T) {
|
||||
JsonData: simplejson.NewFromAny(make(map[string]interface{})),
|
||||
}
|
||||
|
||||
_, err := NewClient(nil, ds, nil)
|
||||
_, err := NewClient(context.Background(), ds, nil)
|
||||
So(err, ShouldNotBeNil)
|
||||
})
|
||||
|
||||
@@ -36,7 +36,7 @@ func TestClient(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
_, err := NewClient(nil, ds, nil)
|
||||
_, err := NewClient(context.Background(), ds, nil)
|
||||
So(err, ShouldNotBeNil)
|
||||
})
|
||||
|
||||
@@ -48,7 +48,7 @@ func TestClient(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
_, err := NewClient(nil, ds, nil)
|
||||
_, err := NewClient(context.Background(), ds, nil)
|
||||
So(err, ShouldNotBeNil)
|
||||
})
|
||||
|
||||
@@ -60,7 +60,7 @@ func TestClient(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
c, err := NewClient(nil, ds, nil)
|
||||
c, err := NewClient(context.Background(), ds, nil)
|
||||
So(err, ShouldBeNil)
|
||||
So(c.GetVersion(), ShouldEqual, 2)
|
||||
})
|
||||
@@ -73,7 +73,7 @@ func TestClient(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
c, err := NewClient(nil, ds, nil)
|
||||
c, err := NewClient(context.Background(), ds, nil)
|
||||
So(err, ShouldBeNil)
|
||||
So(c.GetVersion(), ShouldEqual, 5)
|
||||
})
|
||||
@@ -86,7 +86,7 @@ func TestClient(t *testing.T) {
|
||||
}),
|
||||
}
|
||||
|
||||
c, err := NewClient(nil, ds, nil)
|
||||
c, err := NewClient(context.Background(), ds, nil)
|
||||
So(err, ShouldBeNil)
|
||||
So(c.GetVersion(), ShouldEqual, 56)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user