bypass the proxy for the tests
This commit is contained in:
parent
ad66476c4f
commit
c94fa731aa
|
@ -35,6 +35,9 @@ func TestMain(m *testing.M) {
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
os.Exit(m.Run())
|
os.Exit(m.Run())
|
||||||
}
|
}
|
||||||
|
// On linux with a global proxy the tests will fail as the go client(http,grpc) tries to connect through the proxy.
|
||||||
|
os.Setenv("no_proxy", "localhost,127.0.0.1,0.0.0.0,:")
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
promPath, err = os.Getwd()
|
promPath, err = os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -29,6 +29,11 @@ import (
|
||||||
libtsdb "github.com/prometheus/tsdb"
|
libtsdb "github.com/prometheus/tsdb"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func TestMain(m *testing.M) {
|
||||||
|
// On linux with a global proxy the tests will fail as the go client(http,grpc) tries to connect through the proxy.
|
||||||
|
os.Setenv("no_proxy", "localhost,127.0.0.1,0.0.0.0,:")
|
||||||
|
os.Exit(m.Run())
|
||||||
|
}
|
||||||
func TestGlobalURL(t *testing.T) {
|
func TestGlobalURL(t *testing.T) {
|
||||||
opts := &Options{
|
opts := &Options{
|
||||||
ListenAddress: ":9090",
|
ListenAddress: ":9090",
|
||||||
|
|
Loading…
Reference in New Issue