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

Function TestEncodeAuth

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

Source from the content-addressed store, hash-verified

16)
17
18func TestEncodeAuth(t *testing.T) {
19 newAuthConfig := &types.AuthConfig{Username: "ken", Password: "test"}
20 authStr := encodeAuth(newAuthConfig)
21
22 expected := &types.AuthConfig{}
23 var err error
24 expected.Username, expected.Password, err = decodeAuth(authStr)
25 assert.NilError(t, err)
26 assert.Check(t, is.DeepEqual(expected, newAuthConfig))
27}
28
29func TestProxyConfig(t *testing.T) {
30 var (

Callers

nothing calls this directly

Calls 2

encodeAuthFunction · 0.85
decodeAuthFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…