Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jenting committed Nov 24, 2024
1 parent 6b60c39 commit f601033
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ func TestParsePolicyCSV(t *testing.T) {
p, team-alpha-readonly, applications, get, alpha2-*, allow
p, team-alpha-readonly, applications, get, alpha3-*/*, allow
g, ALPHA READ ONLY, team-alpha-readonly
g, ALPHA READ ONLY_TW, team-alpha-readonly
p, team-beta-readonly, applications, get, beta-*/*, allow
g, BETA READ ONLY, team-beta-readonly
g, BETA READ ONLY_TW, team-beta-readonly
g, [email protected], team-beta-readonly
`,
expectedUserToObjectPatternMapping: map[string][]string{
Expand All @@ -84,9 +86,17 @@ func TestParsePolicyCSV(t *testing.T) {
"alpha2-*",
"alpha3-*",
},
"ALPHA READ ONLY_TW": {
"alpha1-*",
"alpha2-*",
"alpha3-*",
},
"BETA READ ONLY": {
"beta-*",
},
"BETA READ ONLY_TW": {
"beta-*",
},
},
},
{
Expand Down

0 comments on commit f601033

Please sign in to comment.