MCPcopy
hub / github.com/containerd/containerd / TestCustomScope

Function TestCustomScope

core/remotes/docker/scope_test.go:103–110  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestCustomScope(t *testing.T) {
104 scope := "whatever:foo/bar:pull"
105 ctx := WithScope(context.Background(), scope)
106 ctx = ContextWithAppendPullRepositoryScope(ctx, "foo/bar")
107
108 scopes := GetTokenScopes(ctx, []string{})
109 assert.Equal(t, []string{"repository:foo/bar:pull", scope}, scopes)
110}

Callers

nothing calls this directly

Calls 3

WithScopeFunction · 0.85
GetTokenScopesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…