MCPcopy Create free account
hub / github.com/docker/cli / TestNativeStoreGetIdentityToken

Function TestNativeStoreGetIdentityToken

cli/config/credentials/native_store_test.go:152–169  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

150}
151
152func TestNativeStoreGetIdentityToken(t *testing.T) {
153 f := &fakeStore{configs: map[string]types.AuthConfig{
154 validServerAddress2: {},
155 }}
156
157 s := &nativeStore{
158 programFunc: mockCommandFn,
159 fileStore: NewFileStore(f),
160 }
161 actual, err := s.Get(validServerAddress2)
162 assert.NilError(t, err)
163
164 expected := types.AuthConfig{
165 IdentityToken: "abcd1234",
166 ServerAddress: validServerAddress2,
167 }
168 assert.Check(t, is.DeepEqual(expected, actual))
169}
170
171func TestNativeStoreGetAll(t *testing.T) {
172 f := &fakeStore{configs: map[string]types.AuthConfig{

Callers

nothing calls this directly

Calls 2

GetMethod · 0.95
NewFileStoreFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…