From 009e190776c27993e0645923417922fdd2a89f9b Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Wed, 27 Oct 2021 23:58:28 +0300 Subject: [PATCH] fix tests Signed-off-by: Vasiliy Tolstov --- mdns_test.go | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/mdns_test.go b/mdns_test.go index feea768..2ae058d 100644 --- a/mdns_test.go +++ b/mdns_test.go @@ -12,8 +12,7 @@ import ( func TestMDNS(t *testing.T) { ctx := context.Background() - // skip test in travis because of sendto: operation not permitted error - if travis := os.Getenv("TRAVIS"); travis == "true" { + if len(os.Getenv("INTEGRATION_TESTS")) > 0 { t.Skip() } @@ -59,14 +58,8 @@ func TestMDNS(t *testing.T) { }, } - travis := os.Getenv("TRAVIS") - var opts []register.Option - if travis == "true" { - opts = append(opts, register.Timeout(time.Millisecond*100)) - } - // new registry r := NewRegister(opts...) @@ -183,7 +176,7 @@ func TestEncoding(t *testing.T) { func TestWatcher(t *testing.T) { ctx := context.Background() - if travis := os.Getenv("TRAVIS"); travis == "true" { + if len(os.Getenv("INTEGRATION_TESTS")) > 0 { t.Skip() } @@ -257,14 +250,8 @@ func TestWatcher(t *testing.T) { } } - travis := os.Getenv("TRAVIS") - var opts []register.Option - if travis == "true" { - opts = append(opts, register.Timeout(time.Millisecond*100)) - } - // new registry r := NewRegister(opts...)