Commit 18e127db by Mario Trangoni

pkg/tsdb/*: Fix do not pass a nil Context

See,
$ gometalinter --vendor --deadline 6m --disable-all --enable=megacheck ./...
pkg/tsdb/mssql/mssql_test.go:695:33:warning: 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/mysql/mysql_test.go:772:32:warning: 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/postgres/postgres_test.go:704:33:warning: 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)
parent bcdda7b9
......@@ -692,7 +692,7 @@ func TestMSSQL(t *testing.T) {
},
}
resp, err := endpoint.Query(nil, nil, query)
resp, err := endpoint.Query(context.Background(), nil, query)
So(err, ShouldBeNil)
queryResult := resp.Results["A"]
So(queryResult.Error, ShouldBeNil)
......
......@@ -769,7 +769,7 @@ func TestMySQL(t *testing.T) {
},
}
resp, err := endpoint.Query(nil, nil, query)
resp, err := endpoint.Query(context.Background(), nil, query)
So(err, ShouldBeNil)
queryResult := resp.Results["A"]
So(queryResult.Error, ShouldBeNil)
......
......@@ -701,7 +701,7 @@ func TestPostgres(t *testing.T) {
},
}
resp, err := endpoint.Query(nil, nil, query)
resp, err := endpoint.Query(context.Background(), nil, query)
So(err, ShouldBeNil)
queryResult := resp.Results["A"]
So(queryResult.Error, ShouldBeNil)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment