From 4cd2542a3e4bc0a204eb2a950d873a2123bfbe0b Mon Sep 17 00:00:00 2001 From: "Chris S. Kim" Date: Wed, 5 Jan 2022 15:18:08 -0500 Subject: [PATCH] Fix test for ENT (#11946) --- agent/agent_endpoint_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agent/agent_endpoint_test.go b/agent/agent_endpoint_test.go index 7f42732692..5d7bed8bae 100644 --- a/agent/agent_endpoint_test.go +++ b/agent/agent_endpoint_test.go @@ -662,7 +662,7 @@ func TestAgent_Service(t *testing.T) { { name: "err: non-existent proxy", url: "/v1/agent/service/nope", - wantErr: "unknown service ID: nope", + wantErr: fmt.Sprintf("unknown service ID: %s", structs.NewServiceID("nope", nil)), }, { name: "err: bad ACL for service", @@ -4748,7 +4748,8 @@ func TestAgent_ServiceMaintenance_BadRequest(t *testing.T) { resp := httptest.NewRecorder() a.srv.h.ServeHTTP(resp, req) require.Equal(t, 404, resp.Code) - require.Contains(t, resp.Body.String(), `Unknown service ID "_nope_"`) + sid := structs.NewServiceID("_nope_", nil) + require.Contains(t, resp.Body.String(), fmt.Sprintf(`Unknown service ID %q`, sid)) }) }