From 87a5e850625e686194fb0f6aa70fd901255b707a Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Fri, 27 Sep 2019 17:14:24 +0100 Subject: [PATCH 1/2] Add 1.13 support. Fix tests to enable 1.13 support --- .travis.yml | 1 + config/source/flag/flag_test.go | 4 +++- go.mod | 2 -- registry/gossip/gossip_test.go | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 211cb587..1beef16b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: go go: - 1.12.x +- 1.13.x env: - GO111MODULE=on notifications: diff --git a/config/source/flag/flag_test.go b/config/source/flag/flag_test.go index 1b07ac81..e412c904 100644 --- a/config/source/flag/flag_test.go +++ b/config/source/flag/flag_test.go @@ -12,13 +12,14 @@ var ( dbpw = flag.String("database-password", "", "db pw") ) -func init() { +func initTestFlags() { flag.Set("database-host", "localhost") flag.Set("database-password", "some-password") flag.Parse() } func TestFlagsrc_Read(t *testing.T) { + initTestFlags() source := NewSource() c, err := source.Read() if err != nil { @@ -46,6 +47,7 @@ func TestFlagsrc_Read(t *testing.T) { } func TestFlagsrc_ReadAll(t *testing.T) { + initTestFlags() source := NewSource(IncludeUnset(true)) c, err := source.Read() if err != nil { diff --git a/go.mod b/go.mod index 9e83a626..b0f037a3 100644 --- a/go.mod +++ b/go.mod @@ -53,8 +53,6 @@ require ( github.com/miekg/dns v1.1.15 // indirect github.com/mitchellh/gox v1.0.1 // indirect github.com/mitchellh/hashstructure v1.0.0 - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.1 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/nats-io/nats.go v1.8.1 github.com/nats-io/nkeys v0.1.0 // indirect diff --git a/registry/gossip/gossip_test.go b/registry/gossip/gossip_test.go index 3c774a62..9154d08d 100644 --- a/registry/gossip/gossip_test.go +++ b/registry/gossip/gossip_test.go @@ -40,7 +40,7 @@ func TestGossipRegistryBroadcast(t *testing.T) { r1 := newRegistry(Config(mc1), Address("127.0.0.1:54321")) mc2 := newMemberlistConfig() - r2 := newRegistry(Config(mc2), Address("127.0.0.2:54321"), registry.Addrs("127.0.0.1:54321")) + r2 := newRegistry(Config(mc2), Address("127.0.0.1:54322"), registry.Addrs("127.0.0.1:54321")) defer r1.(*gossipRegistry).Stop() defer r2.(*gossipRegistry).Stop() @@ -100,7 +100,7 @@ func TestGossipRegistryRetry(t *testing.T) { r1 := newRegistry(Config(mc1), Address("127.0.0.1:54321")) mc2 := newMemberlistConfig() - r2 := newRegistry(Config(mc2), Address("127.0.0.2:54321"), registry.Addrs("127.0.0.1:54321")) + r2 := newRegistry(Config(mc2), Address("127.0.0.1:54322"), registry.Addrs("127.0.0.1:54321")) defer r1.(*gossipRegistry).Stop() defer r2.(*gossipRegistry).Stop() From de1d9122ea03ff9bffb5fc0432ba286e1fe64605 Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Fri, 27 Sep 2019 17:19:38 +0100 Subject: [PATCH 2/2] Remove 1.13 support because go-quic reasons nobody understands --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1beef16b..211cb587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: go go: - 1.12.x -- 1.13.x env: - GO111MODULE=on notifications: