Skip to content

Commit

Permalink
add dot and hyphen to the role name
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jcieslak committed Jan 26, 2024
1 parent 4e9f226 commit d1f3c67
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/resources/grant_privileges_to_role_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ func TestAcc_GrantPrivilegesToRole_onAccount(t *testing.T) {
// contains escaped identifier, it won't match in the comparison grant.GranteeName == role_name. This results in
// setting privileges to an empty array, which causes infinite plan.
func TestAcc_GrantPrivilegesToRole_OnSchema_InfinitePlan(t *testing.T) {
name := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
name := []byte(strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha)))
name[3] = '.'
name[7] = '-'
databaseName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -88,7 +90,7 @@ func TestAcc_GrantPrivilegesToRole_OnSchema_InfinitePlan(t *testing.T) {
object_name = snowflake_database.db.name
}
}
`, name, databaseName),
`, string(name), databaseName),
ConfigPlanChecks: resource.ConfigPlanChecks{
PostApplyPostRefresh: []plancheck.PlanCheck{
plancheck.ExpectEmptyPlan(),
Expand Down

0 comments on commit d1f3c67

Please sign in to comment.