fix tests
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
ca7565c7c8
commit
009e190776
17
mdns_test.go
17
mdns_test.go
@ -12,8 +12,7 @@ import (
|
|||||||
func TestMDNS(t *testing.T) {
|
func TestMDNS(t *testing.T) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
// skip test in travis because of sendto: operation not permitted error
|
if len(os.Getenv("INTEGRATION_TESTS")) > 0 {
|
||||||
if travis := os.Getenv("TRAVIS"); travis == "true" {
|
|
||||||
t.Skip()
|
t.Skip()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,14 +58,8 @@ func TestMDNS(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
travis := os.Getenv("TRAVIS")
|
|
||||||
|
|
||||||
var opts []register.Option
|
var opts []register.Option
|
||||||
|
|
||||||
if travis == "true" {
|
|
||||||
opts = append(opts, register.Timeout(time.Millisecond*100))
|
|
||||||
}
|
|
||||||
|
|
||||||
// new registry
|
// new registry
|
||||||
r := NewRegister(opts...)
|
r := NewRegister(opts...)
|
||||||
|
|
||||||
@ -183,7 +176,7 @@ func TestEncoding(t *testing.T) {
|
|||||||
func TestWatcher(t *testing.T) {
|
func TestWatcher(t *testing.T) {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
if travis := os.Getenv("TRAVIS"); travis == "true" {
|
if len(os.Getenv("INTEGRATION_TESTS")) > 0 {
|
||||||
t.Skip()
|
t.Skip()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -257,14 +250,8 @@ func TestWatcher(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
travis := os.Getenv("TRAVIS")
|
|
||||||
|
|
||||||
var opts []register.Option
|
var opts []register.Option
|
||||||
|
|
||||||
if travis == "true" {
|
|
||||||
opts = append(opts, register.Timeout(time.Millisecond*100))
|
|
||||||
}
|
|
||||||
|
|
||||||
// new registry
|
// new registry
|
||||||
r := NewRegister(opts...)
|
r := NewRegister(opts...)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user