Skip to content

Commit c4d2f27

Browse files
committed
Test fix: Make addChannelsToPrincipal test helper set nil channels (#6694)
1 parent 633d8f5 commit c4d2f27

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

rest/utilities_testing.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,11 +1655,7 @@ func GetRolePayload(t *testing.T, roleName, password string, collection *db.Data
16551655
// add channels to principal depending if running with collections or not. then marshal the principal config
16561656
func addChannelsToPrincipal(config auth.PrincipalConfig, collection *db.DatabaseCollection, chans []string) ([]byte, error) {
16571657
if base.IsDefaultCollection(collection.ScopeName, collection.Name) {
1658-
if len(chans) == 0 {
1659-
config.ExplicitChannels = base.SetOf("[]")
1660-
} else {
1661-
config.ExplicitChannels = base.SetFromArray(chans)
1662-
}
1658+
config.ExplicitChannels = base.SetFromArray(chans)
16631659
} else {
16641660
config.SetExplicitChannels(collection.ScopeName, collection.Name, chans...)
16651661
}

0 commit comments

Comments
 (0)