Skip to content

Commit

Permalink
Fix timing issue in client tests (#1131)
Browse files Browse the repository at this point in the history
  • Loading branch information
acwest authored Jan 23, 2025
1 parent dbb610a commit 0dbd48f
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 130 deletions.
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

0 comments on commit 0dbd48f

Please sign in to comment.