Skip to content

Commit 0ba33c6

Browse files
committed
feat: add account unlocking to ACC tests
Signed-off-by: Achim Christ <achim.christ@sva.de>
1 parent 422fa31 commit 0ba33c6

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

internal/provider/security/security_account_resource_test.go

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,27 @@ func TestAccSecurityAccountResource(t *testing.T) {
2020
Check: resource.ComposeTestCheckFunc(
2121
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "name", "tf_acc_test"),
2222
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "password", "password123"),
23+
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "locked", "false"),
2324
),
2425
},
2526
// Test updating a resource with comment and locked
2627
{
27-
Config: testAccSecurityAccountResourceConfig("tf_acc_test", "update", true),
28+
Config: testAccSecurityAccountResourceConfig("tf_acc_test", "locked", true),
2829
Check: resource.ComposeTestCheckFunc(
2930
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "name", "tf_acc_test"),
30-
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "comment", "update"),
31+
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "comment", "locked"),
3132
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "locked", "true"),
3233
),
3334
},
35+
// Test updating a resource with comment and unlocked
36+
{
37+
Config: testAccSecurityAccountResourceConfig("tf_acc_test", "unlocked", false),
38+
Check: resource.ComposeTestCheckFunc(
39+
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "name", "tf_acc_test"),
40+
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "comment", "unlocked"),
41+
resource.TestCheckResourceAttr("netapp-ontap_security_account.security_account", "locked", "false"),
42+
),
43+
},
3444
// Test updating a resource with application and secondAuthenticationMethod
3545
{
3646
Config: testAccSecurityAccountResourceConfigUpdateAndCheckIdempotency("tf_acc_test"),

0 commit comments

Comments
 (0)