diff --git a/pkg/postgresflexalpha/wait/wait_test.go b/pkg/postgresflexalpha/wait/wait_test.go index d7118aeb..b4e09a24 100644 --- a/pkg/postgresflexalpha/wait/wait_test.go +++ b/pkg/postgresflexalpha/wait/wait_test.go @@ -2,6 +2,7 @@ package wait import ( "context" + "math" "testing" "time" @@ -168,8 +169,8 @@ func TestCreateInstanceWaitHandler(t *testing.T) { if !cmp.Equal(gotRes, wantRes) { t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) } - } - }) + }, + ) } } @@ -243,8 +244,7 @@ func TestUpdateInstanceWaitHandler(t *testing.T) { if !cmp.Equal(gotRes, wantRes) { t.Fatalf("handler gotRes = %v, want %v", gotRes, wantRes) } - } - }, + }, ) } } @@ -382,14 +382,14 @@ func TestDeleteUserWaitHandler(t *testing.T) { isUserDeleted: !tt.deleteFails, } - handler := DeleteUserWaitHandler(context.Background(), apiClient, "", "", "", userId) + handler := DeleteUserWaitHandler(context.Background(), apiClient, "", "", "", userId) - _, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) + _, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) - if (err != nil) != tt.wantErr { - t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) - } - }, + if (err != nil) != tt.wantErr { + t.Fatalf("handler error = %v, wantErr %v", err, tt.wantErr) + } + }, ) } } diff --git a/stackit/internal/services/postgresflexalpha/user/datasource.go b/stackit/internal/services/postgresflexalpha/user/datasource.go index fda06ee9..a1dd8ca5 100644 --- a/stackit/internal/services/postgresflexalpha/user/datasource.go +++ b/stackit/internal/services/postgresflexalpha/user/datasource.go @@ -48,7 +48,7 @@ func NewUserDataSource() datasource.DataSource { // userDataSource is the data source implementation. type userDataSource struct { - client *postgresflex.APIClient + client *postgresflexalpha.APIClient providerData core.ProviderData } @@ -73,7 +73,7 @@ func (r *userDataSource) Configure( return } - apiClient := postgresflexUtils.ConfigureClient(ctx, &r.providerData, &resp.Diagnostics) + apiClient := postgresflexalphaUtils.ConfigureClient(ctx, &r.providerData, &resp.Diagnostics) if resp.Diagnostics.HasError() { return } diff --git a/stackit/internal/services/postgresflexalpha/user/resource.go b/stackit/internal/services/postgresflexalpha/user/resource.go index 15882af2..399924c0 100644 --- a/stackit/internal/services/postgresflexalpha/user/resource.go +++ b/stackit/internal/services/postgresflexalpha/user/resource.go @@ -62,7 +62,7 @@ func NewUserResource() resource.Resource { // userResource is the resource implementation. type userResource struct { - client *postgresflex.APIClient + client *postgresflexalpha.APIClient providerData core.ProviderData } @@ -113,7 +113,7 @@ func (r *userResource) Configure(ctx context.Context, req resource.ConfigureRequ return } - apiClient := postgresflexUtils.ConfigureClient(ctx, &r.providerData, &resp.Diagnostics) + apiClient := postgresflexalphaUtils.ConfigureClient(ctx, &r.providerData, &resp.Diagnostics) if resp.Diagnostics.HasError() { return }