Skip to content

Commit

Permalink
Merge pull request #845 from auth0/fix-oidc-okta-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiught authored Sep 19, 2023
2 parents d1f827e + 4a693b5 commit dfbfd37
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 228 deletions.
8 changes: 4 additions & 4 deletions internal/auth0/connection/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,8 @@ func TestAccConnectionOIDC(t *testing.T) {
resource.TestCheckTypeSetElemAttr("auth0_connection.oidc", "options.0.scopes.*", "email"),
resource.TestCheckResourceAttr("auth0_connection.oidc", "options.0.set_user_root_attributes", "on_first_login"),
resource.TestCheckResourceAttr("auth0_connection.oidc", "options.0.upstream_params", ""),
resource.TestCheckResourceAttr("auth0_connection.oidc", "options.0.connection_settings.#", "0"),
resource.TestCheckResourceAttr("auth0_connection.oidc", "options.0.attribute_map.#", "0"),
resource.TestCheckResourceAttr("auth0_connection.oidc", "options.0.connection_settings.#", "1"), // Gets set to a default if not provided.
resource.TestCheckResourceAttr("auth0_connection.oidc", "options.0.attribute_map.#", "1"), // Gets set to a default if not provided.
),
},
},
Expand Down Expand Up @@ -794,8 +794,8 @@ func TestAccConnectionOkta(t *testing.T) {
resource.TestCheckTypeSetElemAttr("auth0_connection.okta", "options.0.non_persistent_attrs.*", "gender"),
resource.TestCheckResourceAttr("auth0_connection.okta", "options.0.upstream_params", ""),
resource.TestCheckResourceAttr("auth0_connection.okta", "options.0.icon_url", "https://example.com/v2/logo.svg"),
resource.TestCheckResourceAttr("auth0_connection.okta", "options.0.connection_settings.#", "0"),
resource.TestCheckResourceAttr("auth0_connection.okta", "options.0.attribute_map.#", "0"),
resource.TestCheckResourceAttr("auth0_connection.okta", "options.0.connection_settings.#", "1"), // Gets set to a default if not provided.
resource.TestCheckResourceAttr("auth0_connection.okta", "options.0.attribute_map.#", "1"), // Gets set to a default if not provided.
),
},
},
Expand Down
2 changes: 2 additions & 0 deletions internal/auth0/connection/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ var optionsSchema = &schema.Schema{
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
Computed: true,
Description: "Proof Key for Code Exchange (PKCE) configuration settings for an OIDC or Okta Workforce connection.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
Expand All @@ -812,6 +813,7 @@ var optionsSchema = &schema.Schema{
"attribute_map": {
Type: schema.TypeList,
MaxItems: 1,
Computed: true,
Optional: true,
Description: "OpenID Connect and Okta Workforce connections can automatically map claims received " +
"from the identity provider (IdP). You can configure this mapping through a library template " +
Expand Down
Loading

0 comments on commit dfbfd37

Please sign in to comment.