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

Function TestResolveError

cli/command/idresolver/idresolver_test.go:15–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestResolveError(t *testing.T) {
16 apiClient := &fakeClient{
17 nodeInspectFunc: func(nodeID string) (client.NodeInspectResult, error) {
18 return client.NodeInspectResult{}, errors.New("error inspecting node")
19 },
20 }
21
22 idResolver := New(apiClient, false)
23 _, err := idResolver.Resolve(context.Background(), struct{}{}, "nodeID")
24
25 assert.Error(t, err, "unsupported type")
26}
27
28func TestResolveWithNoResolveOption(t *testing.T) {
29 resolved := false

Callers

nothing calls this directly

Calls 3

ResolveMethod · 0.80
NewFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…