diff --git a/pkg/client/status_test.go b/pkg/client/status_test.go index 7427cd617c..d97da2d534 100644 --- a/pkg/client/status_test.go +++ b/pkg/client/status_test.go @@ -88,7 +88,7 @@ func Test_GetTaskStatus(t *testing.T) { tt := tt // Capture range variable. t.Run(tt.name, func(t *testing.T) { t.Parallel() - client.AddHandler(nutanixtestclient.GetTaskURLPath(tt.taskUUID), tt.handler) + client.AddMockHandler(nutanixtestclient.GetTaskURLPath(tt.taskUUID), tt.handler) status, err := GetTaskStatus(tt.ctx, client.Client, tt.taskUUID) assert.Equal(t, tt.expectedErr, err) @@ -153,7 +153,7 @@ func Test_WaitForTaskCompletion(t *testing.T) { tt := tt // Capture range variable. t.Run(tt.name, func(t *testing.T) { t.Parallel() - client.AddHandler(nutanixtestclient.GetTaskURLPath(tt.taskUUID), tt.handler) + client.AddMockHandler(nutanixtestclient.GetTaskURLPath(tt.taskUUID), tt.handler) err := WaitForTaskToSucceed(tt.ctx, client.Client, tt.taskUUID) if tt.expectedErr != nil { diff --git a/test/helpers/prism-go-client/v3/client.go b/test/helpers/prism-go-client/v3/client.go index 4208b94815..a904d7bba1 100644 --- a/test/helpers/prism-go-client/v3/client.go +++ b/test/helpers/prism-go-client/v3/client.go @@ -60,7 +60,7 @@ func (c *TestClient) Close() { c.server.Close() } -func (c *TestClient) AddHandler(pattern string, handler func(w http.ResponseWriter, r *http.Request)) { +func (c *TestClient) AddMockHandler(pattern string, handler func(w http.ResponseWriter, r *http.Request)) { c.mux.HandleFunc(pattern, handler) }