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

Function TestSave

cli/config/configfile/file_test.go:611–621  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

609}
610
611func TestSave(t *testing.T) {
612 configFile := New("test-save")
613 defer os.Remove("test-save")
614 err := configFile.Save()
615 assert.NilError(t, err)
616 cfg, err := os.ReadFile("test-save")
617 assert.NilError(t, err)
618 assert.Equal(t, string(cfg), `{
619 "auths": {}
620}`)
621}
622
623func TestSaveCustomHTTPHeaders(t *testing.T) {
624 configFile := New(t.Name())

Callers

nothing calls this directly

Calls 3

NewFunction · 0.70
RemoveMethod · 0.65
SaveMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…