Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/resources/asserts/resource_alert_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ resource "grafana_asserts_notification_alerts_config" "test" {
func TestAccAssertsAlertConfig_eventualConsistencyStress(t *testing.T) {
testutils.CheckCloudInstanceTestsEnabled(t)

// Skip this flaky test unless explicitly enabled
if !testutils.AccTestsEnabled("TF_ACC_STRESS_TESTS") {
t.Skip("TF_ACC_STRESS_TESTS must be set to a truthy value for stress tests")
}

stackID := getTestStackID(t)
baseName := fmt.Sprintf("stress-test-%s", acctest.RandString(8))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ resource "grafana_asserts_suppressed_assertions_config" "test" {
func TestAccAssertsDisabledAlertConfig_eventualConsistencyStress(t *testing.T) {
testutils.CheckCloudInstanceTestsEnabled(t)

// Skip this flaky test unless explicitly enabled
if !testutils.AccTestsEnabled("TF_ACC_STRESS_TESTS") {
t.Skip("TF_ACC_STRESS_TESTS must be set to a truthy value for stress tests")
}

stackID := getTestStackID(t)
baseName := fmt.Sprintf("stress-disabled-%s", acctest.RandString(8))

Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/configure_clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ func getHTTPHeadersMap(providerConfig ProviderConfig) (map[string]string, error)
}

func createAssertsClientIfConfigured(client *common.Client, providerConfig ProviderConfig) error {
if !providerConfig.Auth.IsNull() {
if !providerConfig.Auth.IsNull() && !providerConfig.URL.IsNull() {
return createAssertsClient(client, providerConfig)
}
return nil
Expand Down
Loading