mirror of
https://github.com/status-im/consul.git
synced 2025-01-13 15:26:48 +00:00
Fixes vet errors.
This commit is contained in:
parent
33a7b8e401
commit
c1d196152f
@ -17,7 +17,7 @@ func TestCatalog_Datacenters(t *testing.T) {
|
|||||||
retry.Run(t, func(r *retry.R) {
|
retry.Run(t, func(r *retry.R) {
|
||||||
datacenters, err := catalog.Datacenters()
|
datacenters, err := catalog.Datacenters()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.Fatalf("catalog.Datacenters: ", err)
|
r.Fatal(err)
|
||||||
}
|
}
|
||||||
if len(datacenters) < 1 {
|
if len(datacenters) < 1 {
|
||||||
r.Fatal("got 0 datacenters want at least one")
|
r.Fatal("got 0 datacenters want at least one")
|
||||||
@ -33,7 +33,7 @@ func TestCatalog_Nodes(t *testing.T) {
|
|||||||
retry.RunWith(retry.ThreeTimes(), t, func(r *retry.R) {
|
retry.RunWith(retry.ThreeTimes(), t, func(r *retry.R) {
|
||||||
nodes, meta, err := catalog.Nodes(nil)
|
nodes, meta, err := catalog.Nodes(nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
r.Fatalf("catalog.Nodes: ", err)
|
r.Fatal(err)
|
||||||
}
|
}
|
||||||
if meta.LastIndex == 0 {
|
if meta.LastIndex == 0 {
|
||||||
r.Fatal("got last index 0 want > 0")
|
r.Fatal("got last index 0 want > 0")
|
||||||
|
@ -83,7 +83,7 @@ func TestClient_JoinLAN(t *testing.T) {
|
|||||||
joinLAN(t, c1, s1)
|
joinLAN(t, c1, s1)
|
||||||
retry.Run(t, func(r *retry.R) {
|
retry.Run(t, func(r *retry.R) {
|
||||||
if got, want := c1.servers.NumServers(), 1; got != want {
|
if got, want := c1.servers.NumServers(), 1; got != want {
|
||||||
r.Fatal("got %d servers want %d", got, want)
|
r.Fatalf("got %d servers want %d", got, want)
|
||||||
}
|
}
|
||||||
if got, want := len(s1.LANMembers()), 2; got != want {
|
if got, want := len(s1.LANMembers()), 2; got != want {
|
||||||
r.Fatalf("got %d server LAN members want %d", got, want)
|
r.Fatalf("got %d server LAN members want %d", got, want)
|
||||||
@ -346,7 +346,7 @@ func TestClient_SnapshotRPC(t *testing.T) {
|
|||||||
// Wait until we've got a healthy server.
|
// Wait until we've got a healthy server.
|
||||||
retry.Run(t, func(r *retry.R) {
|
retry.Run(t, func(r *retry.R) {
|
||||||
if got, want := c1.servers.NumServers(), 1; got != want {
|
if got, want := c1.servers.NumServers(), 1; got != want {
|
||||||
r.Fatal("got %d servers want %d", got, want)
|
r.Fatalf("got %d servers want %d", got, want)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -401,7 +401,7 @@ func TestClient_SnapshotRPC_TLS(t *testing.T) {
|
|||||||
// Wait until we've got a healthy server.
|
// Wait until we've got a healthy server.
|
||||||
retry.Run(t, func(r *retry.R) {
|
retry.Run(t, func(r *retry.R) {
|
||||||
if got, want := c1.servers.NumServers(), 1; got != want {
|
if got, want := c1.servers.NumServers(), 1; got != want {
|
||||||
r.Fatal("got %d servers want %d", got, want)
|
r.Fatalf("got %d servers want %d", got, want)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user