Skip to content

Commit 1488f3f

Browse files
committed
Enhance TestAccPostgresqlRole_AdminGranted test
We check that the admin role is still granted after the apply (which revoke it temporary inside the transaction)
1 parent 6dad279 commit 1488f3f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

postgresql/resource_postgresql_role_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ resource "postgresql_role" "test_role" {
201201
name = "test_role"
202202
roles = [
203203
"%s"
204-
]
204+
]
205205
}`, admin)
206206

207207
resource.Test(t, resource.TestCase{
@@ -215,7 +215,7 @@ resource "postgresql_role" "test_role" {
215215
{
216216
Config: roleConfig,
217217
Check: resource.ComposeTestCheckFunc(
218-
testAccCheckPostgresqlRoleExists("test_role", nil, nil),
218+
testAccCheckPostgresqlRoleExists("test_role", []string{admin}, nil),
219219
resource.TestCheckResourceAttr("postgresql_role.test_role", "name", "test_role"),
220220
),
221221
},

0 commit comments

Comments
 (0)