(t *testing.T)
| 25 | ) |
| 26 | |
| 27 | func 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 | |
| 39 | func TestNewAPIClientFromFlagsForDefaultSchema(t *testing.T) { |
| 40 | host := ":2375" |
nothing calls this directly
no test coverage detected
searching dependent graphs…