diff --git a/bin/make_all b/bin/make_all index 54f904b..8fbe6d0 100755 --- a/bin/make_all +++ b/bin/make_all @@ -4,7 +4,7 @@ # DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" cd $DIR/../src/sslip.io-dns-server -ldflags="-X xip/xip.VersionSemantic=2.3.0 \ +ldflags="-X xip/xip.VersionSemantic=2.4.0 \ -X xip/xip.VersionDate=$(date +%Y/%m/%d-%H:%M:%S%z) \ -X xip/xip.VersionGitHash=$(git rev-parse --short HEAD)" export GOOS GOARCH diff --git a/bosh-release/src/sslip.io-dns-server/xip/xip_test.go b/bosh-release/src/sslip.io-dns-server/xip/xip_test.go index dccb911..24ec379 100644 --- a/bosh-release/src/sslip.io-dns-server/xip/xip_test.go +++ b/bosh-release/src/sslip.io-dns-server/xip/xip_test.go @@ -201,20 +201,28 @@ var _ = Describe("Xip", func() { When("there's no etcd, just local, in-memory key-value", func() { txtTests() }) - When(`etcd is backing the kv store`, func() { - BeforeEach(func() { - etcdCli, err := clientv3.New(clientv3.Config{ - Endpoints: []string{"localhost:2379"}, - DialTimeout: 250 * time.Millisecond, + etcdURI := "localhost:2379" + // make sure there's an etcd listening before we run our tests + conn, err := net.DialTimeout("tcp", etcdURI, 250*time.Millisecond) + if err == nil { + err = conn.Close() + Expect(err).ToNot(HaveOccurred()) + When(`etcd is backing the kv store`, func() { + BeforeEach(func() { + etcdCli, err := clientv3.New(clientv3.Config{ + Endpoints: []string{etcdURI}, + DialTimeout: 250 * time.Millisecond, + }) + Expect(err).ToNot(HaveOccurred()) + x.Etcd = etcdCli }) - Expect(err).ToNot(HaveOccurred()) - x.Etcd = etcdCli + AfterEach(func() { + err = x.Etcd.Close() + Expect(err).ToNot(HaveOccurred()) + }) + txtTests() }) - AfterEach(func() { - x.Etcd.Close() - }) - txtTests() - }) + } }) })