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 auth0_client Testcases #1125

Merged
merged 3 commits into from
Jan 16, 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
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
go-version-file: go.mod
check-latest: true

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3

- name: Run tests
run: make test-acc

Expand Down
3 changes: 3 additions & 0 deletions internal/auth0/client/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,7 @@ func NewResource() *schema.Resource {
"oidc_logout": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Description: "Configure OIDC logout for the Client",
Elem: &schema.Resource{
Expand Down Expand Up @@ -1385,6 +1386,8 @@ func createClient(ctx context.Context, data *schema.ResourceData, meta interface
return diag.FromErr(err)
}

time.Sleep(800 * time.Millisecond)

data.SetId(client.GetClientID())
return readClient(ctx, data, meta)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/auth0/client/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ func TestAccClientOIDCLogout(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("auth0_client.my_client", "name", fmt.Sprintf("Acceptance Test - OIDC Logout - %s", t.Name())),
resource.TestCheckResourceAttr("auth0_client.my_client", "app_type", "spa"),
resource.TestCheckResourceAttr("auth0_client.my_client", "oidc_logout.#", "0"),
resource.TestCheckResourceAttr("auth0_client.my_client", "oidc_logout.#", "1"),
),
},
},
Expand Down
Loading
Loading