MCPcopy
hub / github.com/ory/keto / assertNamespaces

Function assertNamespaces

internal/driver/config/provider_test.go:75–84  ·  view source on GitHub ↗
(t *testing.T, p *Config, nn ...*namespace.Namespace)

Source from the content-addressed store, hash-verified

73}
74
75func assertNamespaces(t *testing.T, p *Config, nn ...*namespace.Namespace) {
76 t.Helper()
77
78 nm, err := p.NamespaceManager()
79 require.NoError(t, err)
80 actualNamespaces, err := nm.Namespaces(context.Background())
81 require.NoError(t, err)
82 assert.Equal(t, len(nn), len(actualNamespaces))
83 assert.ElementsMatch(t, nn, actualNamespaces)
84}
85
86// The new way to configure namespaces is through the Ory Permissions Language.
87// We check here that we still support enumerating the namespaces directly in

Callers 1

Calls 2

NamespaceManagerMethod · 0.65
NamespacesMethod · 0.65

Tested by

no test coverage detected