Skip to content

Commit de567c3

Browse files
committed
Standardize use of http://testing-mocks.tfe:22180/runtasks/pass between CI and Nightly tests. Fix failing tests using incorrect format for query params.
1 parent dfc8953 commit de567c3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
matrix_index: ${{ matrix.index }}
4343
matrix_total: ${{ matrix.total }}
4444
hostname: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).ngrok_domain }}
45-
run_tasks_url: 'https://httpstat.us/200'
4645
token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_token }}
4746
testing-github-token: ${{ secrets.TESTING_GITHUB_TOKEN }}
4847
admin_configuration_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.configuration }}

internal/provider/resource_tfe_notification_configuration_test.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func TestAccTFENotificationConfiguration_update(t *testing.T) {
124124
resource.TestCheckResourceAttr(
125125
"tfe_notification_configuration.foobar", "triggers.#", "2"),
126126
resource.TestCheckResourceAttr(
127-
"tfe_notification_configuration.foobar", "url", fmt.Sprintf("%s/?update=true", runTasksURL())),
127+
"tfe_notification_configuration.foobar", "url", fmt.Sprintf("%s?update=true", runTasksURL())),
128128
),
129129
},
130130
},
@@ -484,6 +484,8 @@ func TestAccTFENotificationConfiguration_duplicateTriggers(t *testing.T) {
484484
func TestAccTFENotificationConfigurationImport_basic(t *testing.T) {
485485
rInt := rand.New(rand.NewSource(time.Now().UnixNano())).Int()
486486

487+
fmt.Printf("Config for testAccTFENotificationConfigurationImport_basic:\n %s\n", testAccTFENotificationConfiguration_basic(rInt))
488+
487489
resource.Test(t, resource.TestCase{
488490
PreCheck: func() { preCheckTFENotificationConfiguration(t) },
489491
Providers: testAccProviders,
@@ -619,7 +621,7 @@ func testAccCheckTFENotificationConfigurationAttributesUpdate(notificationConfig
619621
return fmt.Errorf("Bad triggers: %v", notificationConfiguration.Triggers)
620622
}
621623

622-
if notificationConfiguration.URL != fmt.Sprintf("%s/?update=true", runTasksURL()) {
624+
if notificationConfiguration.URL != fmt.Sprintf("%s?update=true", runTasksURL()) {
623625
return fmt.Errorf("Bad URL: %s", notificationConfiguration.URL)
624626
}
625627

@@ -884,7 +886,7 @@ resource "tfe_notification_configuration" "foobar" {
884886
enabled = true
885887
token = "1234567890_update"
886888
triggers = ["run:created", "run:needs_attention"]
887-
url = "%s/?update=true"
889+
url = "%s?update=true"
888890
workspace_id = tfe_workspace.foobar.id
889891
}`, rInt, runTasksURL())
890892
}

0 commit comments

Comments
 (0)