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

Commit bc7539e

Browse files
mtesch-umhoxu
authored andcommitted
Test user update to MD5-hashed password
1 parent f2782fd commit bc7539e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

redshift/resource_redshift_user_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ resource "redshift_user" "update_user" {
8383
syslog_access = "UNRESTRICTED"
8484
create_database = true
8585
}
86+
`
87+
var configUpdate2 = `
88+
resource "redshift_user" "update_user" {
89+
name = "update_user2"
90+
connection_limit = 5
91+
password = "md508d5d11f1f947091b312fb36b25e621f"
92+
syslog_access = "UNRESTRICTED"
93+
create_database = true
94+
}
8695
`
8796
resource.Test(t, resource.TestCase{
8897
PreCheck: func() { testAccPreCheck(t) },
@@ -115,6 +124,14 @@ resource "redshift_user" "update_user" {
115124
resource.TestCheckResourceAttr("redshift_user.update_user", "create_database", "true"),
116125
),
117126
},
127+
{
128+
Config: configUpdate2,
129+
Check: resource.ComposeTestCheckFunc(
130+
testAccCheckRedshiftUserExists("update_user2"),
131+
testAccCheckRedshiftUserCanLogin("update_user2", "Foobarbaz6"),
132+
resource.TestCheckResourceAttr("redshift_user.update_user", "password", "md508d5d11f1f947091b312fb36b25e621f"),
133+
),
134+
},
118135
// apply the first one again to check if all parameters roll back properly
119136
{
120137
Config: configCreate,

0 commit comments

Comments
 (0)