MCPcopy
hub / github.com/docker/compose / TestPlanStringNoDeps

Function TestPlanStringNoDeps

pkg/compose/plan_test.go:55–72  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestPlanStringNoDeps(t *testing.T) {
56 p := &Plan{}
57 p.addNode(Operation{
58 Type: OpCreateNetwork,
59 ResourceID: "network:default",
60 Cause: "not found",
61 }, "")
62 p.addNode(Operation{
63 Type: OpCreateVolume,
64 ResourceID: "volume:data",
65 Cause: "not found",
66 }, "")
67
68 expected := "[] -> #1 network:default, CreateNetwork, not found\n" +
69 "[] -> #2 volume:data, CreateVolume, not found\n"
70 assert.Equal(t, p.String(), expected)
71 assert.Assert(t, !p.IsEmpty())
72}
73
74func TestPlanStringWithDeps(t *testing.T) {
75 p := &Plan{}

Callers

nothing calls this directly

Calls 3

addNodeMethod · 0.95
StringMethod · 0.95
IsEmptyMethod · 0.95

Tested by

no test coverage detected