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

Method addRoleChannels

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

Source from the content-addressed store, hash-verified

1456}
1457
1458func (m mockComputerV2) addRoleChannels(t *testing.T, auth *Authenticator, roleName, channelName string, invalSeq uint64) {
1459 if _, ok := m.roleChannels[roleName]; !ok {
1460 m.roleChannels[roleName] = ch.TimedSet{}
1461 }
1462
1463 m.roleChannels[roleName].Add(ch.AtSequence(ch.BaseSetOf(t, channelName), invalSeq))
1464 err := auth.InvalidateDefaultChannels(roleName, false, invalSeq)
1465 assert.NoError(t, err)
1466}
1467
1468func (m mockComputerV2) removeRoleChannel(t *testing.T, auth *Authenticator, roleName, channelName string, invalSeq uint64) {
1469 delete(m.roleChannels[roleName], channelName)

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

AddMethod · 0.45

Tested by

no test coverage detected