diff --git a/api/go.mod b/api/go.mod index 5ac824425..209a33484 100644 --- a/api/go.mod +++ b/api/go.mod @@ -10,7 +10,7 @@ require ( github.com/hashicorp/go-rootcerts v1.0.2 github.com/mitchellh/go-testing-interface v1.14.1 github.com/mitchellh/mapstructure v1.5.0 - github.com/shoenig/test v0.5.2 + github.com/shoenig/test v0.6.0 ) require ( diff --git a/api/go.sum b/api/go.sum index 6d4b5c447..ad0ca50d3 100644 --- a/api/go.sum +++ b/api/go.sum @@ -21,8 +21,8 @@ github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyua github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/shoenig/test v0.5.2 h1:ELZ7qZ/6CPrT71PXrSe2TFzLs4/cGCqqU5lZ5RhZ+B8= -github.com/shoenig/test v0.5.2/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0= +github.com/shoenig/test v0.6.0 h1:rU0ymLHmCRqz14gABce/DzYryKU+uaWqobCBvAY6DtU= +github.com/shoenig/test v0.6.0/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= diff --git a/api/internal/testutil/server.go b/api/internal/testutil/server.go index d62f7f5b6..1297c8a9f 100644 --- a/api/internal/testutil/server.go +++ b/api/internal/testutil/server.go @@ -24,7 +24,6 @@ import ( "github.com/hashicorp/go-cleanhttp" "github.com/hashicorp/nomad/api/internal/testutil/discover" testing "github.com/mitchellh/go-testing-interface" - "github.com/shoenig/test" "github.com/shoenig/test/must" "github.com/shoenig/test/portal" "github.com/shoenig/test/wait" @@ -286,7 +285,7 @@ func (s *TestServer) waitForAPI() { } return nil } - test.Wait(s.t, + must.Wait(s.t, wait.InitialSuccess( wait.ErrorFunc(f), wait.Timeout(10*time.Second), @@ -313,7 +312,7 @@ func (s *TestServer) waitForLeader() { } return nil } - test.Wait(s.t, + must.Wait(s.t, wait.InitialSuccess( wait.ErrorFunc(f), wait.Timeout(10*time.Second), @@ -347,7 +346,7 @@ func (s *TestServer) waitForClient() { } return nil } - test.Wait(s.t, + must.Wait(s.t, wait.InitialSuccess( wait.ErrorFunc(f), wait.Timeout(10*time.Second), diff --git a/go.mod b/go.mod index 9fdbf288e..b4f12f3c1 100644 --- a/go.mod +++ b/go.mod @@ -111,7 +111,7 @@ require ( github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 github.com/shirou/gopsutil/v3 v3.22.11 github.com/shoenig/go-landlock v0.1.3 - github.com/shoenig/test v0.5.2 + github.com/shoenig/test v0.6.0 github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c github.com/stretchr/testify v1.8.1 github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 diff --git a/go.sum b/go.sum index 0e5c08e9d..409fc2f3b 100644 --- a/go.sum +++ b/go.sum @@ -1173,8 +1173,8 @@ github.com/shirou/gopsutil/v3 v3.22.11 h1:kxsPKS+Eeo+VnEQ2XCaGJepeP6KY53QoRTETx3 github.com/shirou/gopsutil/v3 v3.22.11/go.mod h1:xl0EeL4vXJ+hQMAGN8B9VFpxukEMA0XdevQOe5MZ1oY= github.com/shoenig/go-landlock v0.1.3 h1:C2msGjuYBCtyJ8+0m7BlcuQgypsiW1jEIKENL/lJANg= github.com/shoenig/go-landlock v0.1.3/go.mod h1:y7C09FIsHOe9nM586kp08p6cLvJFDR0ogvCG/LY/Gjk= -github.com/shoenig/test v0.5.2 h1:ELZ7qZ/6CPrT71PXrSe2TFzLs4/cGCqqU5lZ5RhZ+B8= -github.com/shoenig/test v0.5.2/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0= +github.com/shoenig/test v0.6.0 h1:rU0ymLHmCRqz14gABce/DzYryKU+uaWqobCBvAY6DtU= +github.com/shoenig/test v0.6.0/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= diff --git a/nomad/acl_test.go b/nomad/acl_test.go index 9b7590794..f25da5b97 100644 --- a/nomad/acl_test.go +++ b/nomad/acl_test.go @@ -273,22 +273,22 @@ func TestAuthenticate_mTLS(t *testing.T) { if tc.expectAccessor != "" { must.NotNil(t, resp.Identity.ACLToken, must.Sprint("expected ACL token")) test.Eq(t, tc.expectAccessor, resp.Identity.ACLToken.AccessorID, - must.Sprint("expected ACL token accessor ID")) + test.Sprint("expected ACL token accessor ID")) } test.Eq(t, tc.expectClientID, resp.Identity.ClientID, - must.Sprint("expected client ID")) + test.Sprint("expected client ID")) if tc.expectAllocID != "" { must.NotNil(t, resp.Identity.Claims, must.Sprint("expected claims")) test.Eq(t, tc.expectAllocID, resp.Identity.Claims.AllocationID, - must.Sprint("expected workload identity")) + test.Sprint("expected workload identity")) } - test.Eq(t, tc.expectTLSName, resp.Identity.TLSName, must.Sprint("expected TLS name")) + test.Eq(t, tc.expectTLSName, resp.Identity.TLSName, test.Sprint("expected TLS name")) if tc.expectIP == "" { - test.Nil(t, resp.Identity.RemoteIP, must.Sprint("expected no remote IP")) + test.Nil(t, resp.Identity.RemoteIP, test.Sprint("expected no remote IP")) } else { test.Eq(t, tc.expectIP, resp.Identity.RemoteIP.String()) } diff --git a/nomad/variables_endpoint_test.go b/nomad/variables_endpoint_test.go index ff0191230..7f32f2f91 100644 --- a/nomad/variables_endpoint_test.go +++ b/nomad/variables_endpoint_test.go @@ -9,7 +9,6 @@ import ( "time" msgpackrpc "github.com/hashicorp/net-rpc-msgpackrpc" - "github.com/shoenig/test" "github.com/shoenig/test/must" "github.com/hashicorp/nomad/acl" @@ -709,7 +708,7 @@ namespace "*" {} for _, sv := range resp.Data { found += fmt.Sprintf(" ns=%s path=%s\n", sv.Namespace, sv.Path) } - must.Len(t, expectedCount, resp.Data, test.Sprintf("%s", found)) + must.Len(t, expectedCount, resp.Data, must.Sprintf("%s", found)) }) }