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⚠️ 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⚠️ 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⚠️ 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:
Mario Trangoni 2018-10-10 23:04:14 +02:00
parent bcdda7b9ad
commit 18e127db2a
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)