MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / addRole

Method addRole

auth/auth_test.go:1474–1482  ·  view source on GitHub ↗
(t *testing.T, auth *Authenticator, userName, roleName string, invalSeq uint64)

Source from the content-addressed store, hash-verified

1472}
1473
1474func (m mockComputerV2) addRole(t *testing.T, auth *Authenticator, userName, roleName string, invalSeq uint64) {
1475 if _, ok := m.roles[userName]; !ok {
1476 m.roles[userName] = ch.TimedSet{}
1477 }
1478
1479 m.roles[userName].Add(ch.AtSequence(ch.BaseSetOf(t, roleName), invalSeq))
1480 err := auth.InvalidateRoles(userName, invalSeq)
1481 assert.NoError(t, err)
1482}
1483
1484func (m mockComputerV2) removeRole(t *testing.T, auth *Authenticator, userName, roleName string, invalSeq uint64) {
1485 delete(m.roles[userName], roleName)

Callers 15

TestRevocationScenario1Function · 0.95
TestRevocationScenario2Function · 0.95
TestRevocationScenario3Function · 0.95
TestRevocationScenario4Function · 0.95
TestRevocationScenario5Function · 0.95
TestRevocationScenario6Function · 0.95
TestRevocationScenario7Function · 0.95
TestRevocationScenario8Function · 0.95
TestRevocationScenario9Function · 0.95
TestRevocationScenario10Function · 0.95
TestRevocationScenario11Function · 0.95
TestRevocationScenario12Function · 0.95

Calls 2

InvalidateRolesMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected