Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize use of testing-mocks.tfe for run_tasks_url between CI and Nightly tests #1473

Merged
merged 1 commit into from
Sep 18, 2024
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
matrix_index: ${{ matrix.index }}
matrix_total: ${{ matrix.total }}
hostname: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).ngrok_domain }}
run_tasks_url: 'https://httpstat.us/200'
token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_token }}
testing-github-token: ${{ secrets.TESTING_GITHUB_TOKEN }}
admin_configuration_token: ${{ fromJSON(steps.tflocal.outputs.workspace-outputs-json).tfe_admin_token_by_role.configuration }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func TestAccTFENotificationConfiguration_update(t *testing.T) {
resource.TestCheckResourceAttr(
"tfe_notification_configuration.foobar", "triggers.#", "2"),
resource.TestCheckResourceAttr(
"tfe_notification_configuration.foobar", "url", fmt.Sprintf("%s/?update=true", runTasksURL())),
"tfe_notification_configuration.foobar", "url", fmt.Sprintf("%s?update=true", runTasksURL())),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry it took me quite awhile to realize it myself 😄

),
},
},
Expand Down Expand Up @@ -484,6 +484,8 @@ func TestAccTFENotificationConfiguration_duplicateTriggers(t *testing.T) {
func TestAccTFENotificationConfigurationImport_basic(t *testing.T) {
rInt := rand.New(rand.NewSource(time.Now().UnixNano())).Int()

fmt.Printf("Config for testAccTFENotificationConfigurationImport_basic:\n %s\n", testAccTFENotificationConfiguration_basic(rInt))

resource.Test(t, resource.TestCase{
PreCheck: func() { preCheckTFENotificationConfiguration(t) },
Providers: testAccProviders,
Expand Down Expand Up @@ -619,7 +621,7 @@ func testAccCheckTFENotificationConfigurationAttributesUpdate(notificationConfig
return fmt.Errorf("Bad triggers: %v", notificationConfiguration.Triggers)
}

if notificationConfiguration.URL != fmt.Sprintf("%s/?update=true", runTasksURL()) {
if notificationConfiguration.URL != fmt.Sprintf("%s?update=true", runTasksURL()) {
return fmt.Errorf("Bad URL: %s", notificationConfiguration.URL)
}

Expand Down Expand Up @@ -884,7 +886,7 @@ resource "tfe_notification_configuration" "foobar" {
enabled = true
token = "1234567890_update"
triggers = ["run:created", "run:needs_attention"]
url = "%s/?update=true"
url = "%s?update=true"
workspace_id = tfe_workspace.foobar.id
}`, rInt, runTasksURL())
}
Expand Down
Loading