Skip to content

Commit

Permalink
fix remaining CI failures after Go 1.12.1 Upgrade (#5576)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanshasselberg authored Mar 29, 2019
1 parent 0d1b496 commit ac45b17
Show file tree
Hide file tree
Showing 137 changed files with 42 additions and 8,346 deletions.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ vet:
# changes to the UI assets that aren't checked in.
static-assets:
@go-bindata-assetfs -pkg agent -prefix pkg -o $(ASSETFS_PATH) ./pkg/web_ui/...
$(MAKE) format
@go fmt $(ASSETFS_PATH)


# Build the static web ui and build static assets inside a Docker container
Expand Down
2 changes: 1 addition & 1 deletion agent/retry_join_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func TestGoDiscoverRegistration(t *testing.T) {
t.Fatal(err)
}
got := d.Names()
want := []string{"aliyun", "aws", "azure", "digitalocean", "gce", "os", "packet", "scaleway", "softlayer", "triton", "vsphere"}
want := []string{"aliyun", "aws", "azure", "digitalocean", "gce", "mdns", "os", "packet", "scaleway", "softlayer", "triton", "vsphere"}
if !reflect.DeepEqual(got, want) {
t.Fatalf("got go-discover providers %v want %v", got, want)
}
Expand Down
5 changes: 1 addition & 4 deletions api/catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/hashicorp/consul/sdk/testutil"
"github.com/hashicorp/consul/sdk/testutil/retry"
"github.com/pascaldekloe/goe/verify"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -67,9 +66,7 @@ func TestAPI_CatalogNodes(t *testing.T) {
ModifyIndex: meta.LastIndex,
},
}
if !verify.Values(r, "", nodes, want) {
r.FailNow()
}
require.Equal(r, want, nodes)
})
}

Expand Down
6 changes: 2 additions & 4 deletions api/connect_ca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"testing"
"time"

"github.com/pascaldekloe/goe/verify"

"github.com/hashicorp/consul/sdk/testutil"
"github.com/hashicorp/consul/sdk/testutil/retry"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -77,7 +75,7 @@ func TestAPI_ConnectCAConfig_get_set(t *testing.T) {
}
parsed, err := ParseConsulCAConfig(conf.Config)
r.Check(err)
verify.Values(r, "", parsed, expected)
require.Equal(r, expected, parsed)

// Change a config value and update
conf.Config["PrivateKey"] = ""
Expand All @@ -90,6 +88,6 @@ func TestAPI_ConnectCAConfig_get_set(t *testing.T) {
expected.RotationPeriod = 120 * 24 * time.Hour
parsed, err = ParseConsulCAConfig(updated.Config)
r.Check(err)
verify.Values(r, "", parsed, expected)
require.Equal(r, expected, parsed)
})
}
4 changes: 2 additions & 2 deletions api/coordinate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/hashicorp/consul/sdk/testutil/retry"
"github.com/hashicorp/serf/coordinate"
"github.com/pascaldekloe/goe/verify"
"github.com/stretchr/testify/require"
)

func TestAPI_CoordinateDatacenters(t *testing.T) {
Expand Down Expand Up @@ -101,6 +101,6 @@ func TestAPI_CoordinateUpdate(t *testing.T) {
if len(coords) != 1 {
r.Fatalf("bad: %v", coords)
}
verify.Values(r, "", coords[0], entry)
require.Equal(r, entry, coords[0])
})
}
3 changes: 1 addition & 2 deletions api/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (

"github.com/hashicorp/consul/sdk/testutil"
"github.com/hashicorp/consul/sdk/testutil/retry"
"github.com/pascaldekloe/goe/verify"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -215,7 +214,7 @@ func TestAPI_HealthChecks(t *testing.T) {
}
checks[0].CreateIndex = out[0].CreateIndex
checks[0].ModifyIndex = out[0].ModifyIndex
verify.Values(r, "checks", out, checks)
require.Equal(r, checks, out)
})
}

Expand Down
5 changes: 2 additions & 3 deletions build-support/docker/Build-Go.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ ARG GOTOOLS="github.com/elazarl/go-bindata-assetfs/... \
github.com/axw/gocov/gocov \
gopkg.in/matm/v1/gocov-html"

RUN go get -u -v ${GOTOOLS} && mkdir -p ${GOPATH}/src/github.com/hashicorp/consul

WORKDIR $GOPATH/src/github.com/hashicorp/consul
RUN go get -u -v ${GOTOOLS} && mkdir -p /consul

WORKDIR /consul
12 changes: 6 additions & 6 deletions build-support/functions/20-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ function build_assetfs {
local ret=$?
if test $ret -eq 0
then
status "Copying the sources from '${sdir}/(pkg/web_ui|GNUmakefile)' to /go/src/github.com/hashicorp/consul/pkg"
status "Copying the sources from '${sdir}/(pkg/web_ui|GNUmakefile)' to /consul/pkg"
(
tar -c pkg/web_ui GNUmakefile | docker cp - ${container_id}:/go/src/github.com/hashicorp/consul &&
tar -c pkg/web_ui GNUmakefile | docker cp - ${container_id}:/consul &&
status "Running build in container" && docker start -i ${container_id} &&
status "Copying back artifacts" && docker cp ${container_id}:/go/src/github.com/hashicorp/consul/bindata_assetfs.go ${sdir}/agent/bindata_assetfs.go
status "Copying back artifacts" && docker cp ${container_id}:/consul/bindata_assetfs.go ${sdir}/agent/bindata_assetfs.go
)
ret=$?
docker rm ${container_id} > /dev/null
Expand Down Expand Up @@ -327,13 +327,13 @@ function build_consul {

if test $ret -eq 0
then
status "Copying the source from '${sdir}' to /go/src/github.com/hashicorp/consul"
status "Copying the source from '${sdir}' to /consul"
(
tar -c $(ls | grep -v "^(ui\|ui-v2\|website\|bin\|pkg\|.git)") | docker cp - ${container_id}:/go/src/github.com/hashicorp/consul &&
tar -c $(ls | grep -v "^(ui\|ui-v2\|website\|bin\|pkg\|.git)") | docker cp - ${container_id}:/consul &&
status "Running build in container" &&
docker start -i ${container_id} &&
status "Copying back artifacts" &&
docker cp ${container_id}:/go/src/github.com/hashicorp/consul/pkg/bin pkg.bin.new
docker cp ${container_id}:/consul/pkg/bin pkg.bin.new
)
ret=$?
docker rm ${container_id} > /dev/null
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ require (
github.com/hashicorp/hcl v0.0.0-20180906183839-65a6292f0157
github.com/hashicorp/hil v0.0.0-20160711231837-1e86c6b523c5
github.com/hashicorp/logutils v1.0.0
github.com/hashicorp/mdns v1.0.1 // indirect
github.com/hashicorp/memberlist v0.1.3
github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69
github.com/hashicorp/raft v0.0.0-20180817181211-da92cfe76e0c
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs=
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/mdns v1.0.1 h1:XFSOubp8KWB+Jd2PDyaX5xUd5bhSP/+pTDZVDMzZJM8=
github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY=
github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/net-rpc-msgpackrpc v0.0.0-20151116020338-a14192a58a69 h1:lc3c72qGlIMDqQpQH82Y4vaglRMMFdJbziYWriR4UcE=
Expand Down
3 changes: 0 additions & 3 deletions vendor/github.com/hashicorp/go.net/AUTHORS

This file was deleted.

3 changes: 0 additions & 3 deletions vendor/github.com/hashicorp/go.net/CONTRIBUTORS

This file was deleted.

27 changes: 0 additions & 27 deletions vendor/github.com/hashicorp/go.net/LICENSE

This file was deleted.

22 changes: 0 additions & 22 deletions vendor/github.com/hashicorp/go.net/PATENTS

This file was deleted.

Loading

0 comments on commit ac45b17

Please sign in to comment.