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

Function requireCanSeeChannels

auth/auth_test.go:36–42  ·  view source on GitHub ↗

requireCanSeeChannels asserts that the given principal can see all of the specified channels.

(t *testing.T, princ Principal, channels ...string)

Source from the content-addressed store, hash-verified

34
35// requireCanSeeChannels asserts that the given principal can see all of the specified channels.
36func requireCanSeeChannels(t *testing.T, princ Principal, channels ...string) {
37 for _, channel := range channels {
38 canSee, err := princ.canSeeChannel(channel)
39 require.NoError(t, err)
40 require.True(t, canSee, "Expected %s to be able to see channel %q", princ.Name(), channel)
41 }
42}
43
44// assertCannotSeeChannels asserts that the given principal cannot see any of the specified channels.
45func requireCannotSeeChannels(t *testing.T, princ Principal, channels ...string) {

Callers 11

TestUserAccessFunction · 0.85
TestRoleInheritanceFunction · 0.85
TestGetPrincipalFunction · 0.85
TestRevocationScenario1Function · 0.85
TestRevocationScenario2Function · 0.85
TestRevocationScenario3Function · 0.85
TestRevocationScenario4Function · 0.85
TestRevocationScenario5Function · 0.85
TestRevocationScenario6Function · 0.85
TestRevocationScenario7Function · 0.85
TestRevocationScenario11Function · 0.85

Calls 2

canSeeChannelMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected