Skip to content

Commit 5fa5c1a

Browse files
committed
ensure all special chars are removed
1 parent 9c6b4a4 commit 5fa5c1a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/main.tftest.hcl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ variables {
2323
}
2424

2525
run "validate_databases" {
26-
command = plan
26+
command = apply
2727

2828
providers = {
2929
postgresql = postgresql.mock
@@ -70,9 +70,8 @@ run "validate_roles_with_random_password" {
7070
error_message = "Role should have random password"
7171
}
7272

73-
# ensure no special characters
7473
assert {
75-
condition = !contains(split("", postgresql_role.role["app_user2"].password), "!")
76-
error_message = "Password should not contain the '!' character"
74+
condition = !contains(split("", postgresql_role.role["app_user2"].password), "!#$%^&*()<>-_")
75+
error_message = "Password should not contain the '!#$%^&*()<>-_' characters"
7776
}
7877
}

0 commit comments

Comments
 (0)