Skip to content

Commit

Permalink
Fix TestAccOktaPolicyPassword_crud integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
monde committed Apr 20, 2022
1 parent 2344e8d commit ad0d7f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions okta/resource_okta_policy_password.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ func resourcePolicyPassword() *schema.Resource {
Default: 0,
},
"password_max_lockout_attempts": {
Type: schema.TypeInt,
Optional: true,
Description: "Number of unsuccessful login attempts allowed before lockout: 0 = no limit.",
Default: 10,
Type: schema.TypeInt,
Optional: true,
Description: "Number of unsuccessful login attempts allowed before lockout: 0 = no limit.",
Default: 10,
DiffSuppressFunc: createValueDiffSuppression("0"), // default from Okta can be set to other than 10
},
"password_auto_unlock_minutes": {
Type: schema.TypeInt,
Expand Down
2 changes: 1 addition & 1 deletion okta/resource_okta_policy_password_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func TestAccOktaPolicyPassword_crud(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "password_expire_warn_days", "15"),
resource.TestCheckResourceAttr(resourceName, "password_min_age_minutes", "60"),
resource.TestCheckResourceAttr(resourceName, "password_history_count", "5"),
resource.TestCheckResourceAttr(resourceName, "password_max_lockout_attempts", "0"),
// resource.TestCheckResourceAttr(resourceName, "password_max_lockout_attempts", "0"), // this default value can be overwritten on the org, don't test the default
resource.TestCheckResourceAttr(resourceName, "password_auto_unlock_minutes", "2"),
resource.TestCheckResourceAttr(resourceName, "password_show_lockout_failures", "true"),
resource.TestCheckResourceAttr(resourceName, "password_lockout_notification_channels.#", "1"),
Expand Down

0 comments on commit ad0d7f4

Please sign in to comment.