Skip to content

Commit e5e5287

Browse files
committed
Update notification configuration to re-use run task host
1 parent 51220c5 commit e5e5287

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

helper_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,18 @@ func createNotificationConfiguration(t *testing.T, client *Client, w *Workspace,
576576
w, wCleanup = createWorkspace(t, client, nil)
577577
}
578578

579+
runTaskURL := os.Getenv("TFC_RUN_TASK_URL")
580+
if runTaskURL == "" {
581+
t.Skip("Cannot create a notification configuration with an empty URL. You must set TFC_RUN_TASK_URL for run task related tests.")
582+
}
583+
579584
if options == nil {
580585
options = &NotificationConfigurationCreateOptions{
581586
DestinationType: NotificationDestination(NotificationDestinationTypeGeneric),
582587
Enabled: Bool(false),
583588
Name: String(randomString(t)),
584589
Token: String(randomString(t)),
585-
URL: String("http://example.com"),
590+
URL: String(runTaskURL),
586591
Triggers: []NotificationTriggerType{NotificationTriggerCreated},
587592
}
588593
}

0 commit comments

Comments
 (0)