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

Fix timing issue in client tests #1131

Merged
merged 1 commit into from
Jan 23, 2025
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
10 changes: 9 additions & 1 deletion internal/auth0/client/data_source_clients_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ import (
"github.com/auth0/terraform-provider-auth0/internal/acctest"
)

const testAccGivenSomeClients = `
const testAccGivenOneClient = `
resource "auth0_client" "my_client_1" {
name = "Acceptance Test 1 - {{.testName}}"
app_type = "non_interactive"
is_first_party = true
description = "Description for client 1 {{.testName}}"
}
`

const testAccGivenSomeClients = testAccGivenOneClient + `
resource "auth0_client" "my_client_2" {
name = "Acceptance Test 2 - {{.testName}}"
app_type = "spa"
Expand Down Expand Up @@ -76,6 +78,12 @@ func TestAccDataClients(t *testing.T) {
`expected app_types\.0 to be one of \["native" "spa" "regular_web" "non_interactive" "rms" "box" "cloudbees" "concur" "dropbox" "mscrm" "echosign" "egnyte" "newrelic" "office365" "salesforce" "sentry" "sharepoint" "slack" "springcm" "sso_integration" "zendesk" "zoom"\], got invalid`,
),
},
{
// We had to split this into two separate posts to work around an issue
// in the test recording library. We need to add X-Request-Id header to the POST requests
// to fix this, and make sure that go-vcr uses that to match requests.
Config: acctest.ParseTestName(testAccGivenOneClient, t.Name()),
},
{
Config: acctest.ParseTestName(testAccGivenSomeClients, t.Name()),
},
Expand Down
Loading
Loading