From ba9b19d58bea2a0c9da00731d847af3220045d91 Mon Sep 17 00:00:00 2001 From: Dimitri Koshkin Date: Thu, 4 Jan 2024 19:38:25 -0800 Subject: [PATCH] fix: better function name --- pkg/client/status_test.go | 4 ++-- test/helpers/prism-go-client/v3/client.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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) }