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

Function TestNativeStoreGet

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

Source from the content-addressed store, hash-verified

129}
130
131func TestNativeStoreGet(t *testing.T) {
132 f := &fakeStore{configs: map[string]types.AuthConfig{
133 validServerAddress: {
134 Username: "foo@example.com",
135 },
136 }}
137 s := &nativeStore{
138 programFunc: mockCommandFn,
139 fileStore: NewFileStore(f),
140 }
141 actual, err := s.Get(validServerAddress)
142 assert.NilError(t, err)
143
144 expected := types.AuthConfig{
145 Username: "foo",
146 Password: "bar",
147 ServerAddress: validServerAddress,
148 }
149 assert.Check(t, is.DeepEqual(expected, actual))
150}
151
152func TestNativeStoreGetIdentityToken(t *testing.T) {
153 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…