Skip to content

Commit

Permalink
Test (#1125)
Browse files Browse the repository at this point in the history
* Test

* better test

* Add terraform to tests image
  • Loading branch information
acwest authored Jan 16, 2025
1 parent 469673d commit ed23c52
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 219 deletions.
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

0 comments on commit ed23c52

Please sign in to comment.