MCPcopy Index your code
hub / github.com/docker/cli / TestNewAPIClientFromFlags

Function TestNewAPIClientFromFlags

cli/command/cli_test.go:27–37  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

25)
26
27func TestNewAPIClientFromFlags(t *testing.T) {
28 host := "unix://path"
29 if runtime.GOOS == "windows" {
30 host = "npipe://./"
31 }
32 opts := &flags.ClientOptions{Hosts: []string{host}}
33 apiClient, err := NewAPIClientFromFlags(opts, &configfile.ConfigFile{})
34 assert.NilError(t, err)
35 assert.Equal(t, apiClient.DaemonHost(), host)
36 assert.Equal(t, apiClient.ClientVersion(), client.MaxAPIVersion)
37}
38
39func TestNewAPIClientFromFlagsForDefaultSchema(t *testing.T) {
40 host := ":2375"

Callers

nothing calls this directly

Calls 2

NewAPIClientFromFlagsFunction · 0.85
ClientVersionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…