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

Function TestNativeStoreErase

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

Source from the content-addressed store, hash-verified

218}
219
220func TestNativeStoreErase(t *testing.T) {
221 f := &fakeStore{configs: map[string]types.AuthConfig{
222 validServerAddress: {},
223 }}
224
225 s := &nativeStore{
226 programFunc: mockCommandFn,
227 fileStore: NewFileStore(f),
228 }
229 err := s.Erase(validServerAddress)
230 assert.NilError(t, err)
231 assert.Check(t, is.Len(f.GetAuthConfigs(), 0))
232}
233
234func TestNativeStoreEraseInvalidAddress(t *testing.T) {
235 f := &fakeStore{configs: map[string]types.AuthConfig{

Callers

nothing calls this directly

Calls 4

EraseMethod · 0.95
GetAuthConfigsMethod · 0.95
NewFileStoreFunction · 0.85
LenMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…