From 298cfddb3a26411fc2fb90851de2404cf2a380b3 Mon Sep 17 00:00:00 2001 From: Dimitri Koshkin Date: Wed, 3 Jan 2024 05:48:56 -0800 Subject: [PATCH] fixup! test: add unit tests for pkg/client/state --- pkg/client/status_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/client/status_test.go b/pkg/client/status_test.go index 99cdcbbc01..63dc5c8491 100644 --- a/pkg/client/status_test.go +++ b/pkg/client/status_test.go @@ -10,11 +10,11 @@ import ( "github.com/stretchr/testify/assert" "k8s.io/apimachinery/pkg/util/wait" - nutanixTestClient "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/test/helpers/prism-go-client/v3" + nutanixtestclient "github.com/nutanix-cloud-native/cluster-api-provider-nutanix/test/helpers/prism-go-client/v3" ) func Test_GetTaskStatus(t *testing.T) { - client, err := nutanixTestClient.NewTestClient() + client, err := nutanixtestclient.NewTestClient() assert.NoError(t, err) // use cleanup over defer as the connection gets closed before the tests run with t.Parallel() t.Cleanup(func() { @@ -73,7 +73,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.AddHandler(nutanixtestclient.GetTaskURLPath(tt.taskUUID), tt.handler) status, err := GetTaskStatus(tt.ctx, client.Client, tt.taskUUID) assert.Equal(t, tt.expectedErr, err) @@ -83,7 +83,7 @@ func Test_GetTaskStatus(t *testing.T) { } func Test_WaitForTaskCompletion(t *testing.T) { - client, err := nutanixTestClient.NewTestClient() + client, err := nutanixtestclient.NewTestClient() assert.NoError(t, err) // use cleanup over defer as the connection gets closed before the tests run with t.Parallel() t.Cleanup(func() { @@ -134,7 +134,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.AddHandler(nutanixtestclient.GetTaskURLPath(tt.taskUUID), tt.handler) err := WaitForTaskToSucceed(tt.ctx, client.Client, tt.taskUUID) if tt.expectedErr != nil {