diff --git a/internal/resources/cloud/resource_cloud_stack_api_key_test.go b/internal/resources/cloud/resource_cloud_stack_api_key_test.go index 056b0a74c..a43154248 100644 --- a/internal/resources/cloud/resource_cloud_stack_api_key_test.go +++ b/internal/resources/cloud/resource_cloud_stack_api_key_test.go @@ -72,7 +72,7 @@ func testAccGrafanaAuthCheckKeys(stack *gcom.FormattedApiInstance, expectedKeys response, err := c.APIKeys.GetAPIkeys(api_keys.NewGetAPIkeysParams()) if err != nil { - return err + return fmt.Errorf("failed to get API keys: %w", err) } var foundKeys []string @@ -141,9 +141,12 @@ func createTemporaryStackGrafanaClient(ctx context.Context, cloudClient *gcom.AP } client := goapi.NewHTTPClientWithConfig(nil, &goapi.TransportConfig{ - Host: stackURLParsed.Host, - Schemes: []string{stackURLParsed.Scheme}, - APIKey: token.Key, + Host: stackURLParsed.Host, + Schemes: []string{stackURLParsed.Scheme}, + BasePath: "api", + APIKey: token.Key, + NumRetries: 5, + RetryTimeout: 10 * time.Second, }) cleanup := func() error { diff --git a/internal/resources/cloud/resource_cloud_stack_service_account_test.go b/internal/resources/cloud/resource_cloud_stack_service_account_test.go index 4a3098042..9b36bbf28 100644 --- a/internal/resources/cloud/resource_cloud_stack_service_account_test.go +++ b/internal/resources/cloud/resource_cloud_stack_service_account_test.go @@ -76,7 +76,7 @@ func testAccGrafanaAuthCheckServiceAccounts(stack *gcom.FormattedApiInstance, ex response, err := c.ServiceAccounts.SearchOrgServiceAccountsWithPaging(service_accounts.NewSearchOrgServiceAccountsWithPagingParams()) if err != nil { - return err + return fmt.Errorf("failed to get service accounts: %w", err) } var foundSAs []string