Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

Commit f2782fd

Browse files
committed
Test that user with MD5-hashed password can log in
1 parent dc137eb commit f2782fd

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

redshift/resource_redshift_user_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ func TestAccRedshiftUser_Basic(t *testing.T) {
3131
resource.TestCheckResourceAttr("redshift_user.with_email", "name", "[email protected]"),
3232
testAccCheckRedshiftUserCanLogin("[email protected]", "Foobarbaz1"),
3333

34+
testAccCheckRedshiftUserExists("hashed_password"),
35+
testAccCheckRedshiftUserCanLogin("hashed_password", "Foobarbaz2"),
36+
3437
testAccCheckRedshiftUserExists("user_defaults"),
3538
resource.TestCheckResourceAttr("redshift_user.user_with_defaults", "name", "user_defaults"),
3639
resource.TestCheckResourceAttr("redshift_user.user_with_defaults", "superuser", "false"),
@@ -413,6 +416,11 @@ resource "redshift_user" "with_email" {
413416
password = "Foobarbaz1"
414417
}
415418
419+
resource "redshift_user" "with_hashed_password" {
420+
name = "hashed_password"
421+
password = "md5ad3b897bab2474bc7e408326cb18c42f"
422+
}
423+
416424
resource "redshift_user" "user_with_defaults" {
417425
name = "user_defaults"
418426
valid_until = "infinity"

0 commit comments

Comments
 (0)