Skip to content

Commit

Permalink
fix: better function name
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoshkin committed Jan 10, 2024
1 parent 6a32d61 commit 946d1c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/client/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/prism-go-client/v3/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 946d1c2

Please sign in to comment.