MCPcopy
hub / github.com/apache/devlake / TestPipelinePlan_IsEmpty

Function TestPipelinePlan_IsEmpty

backend/core/models/pipeline_test.go:26–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestPipelinePlan_IsEmpty(t *testing.T) {
27 tests := []struct {
28 name string
29 plan PipelinePlan
30 want bool
31 }{
32 {
33 name: "empty",
34 plan: PipelinePlan{},
35 want: true,
36 },
37 {
38 name: "empty",
39 plan: []PipelineStage{{}, {}},
40 want: true,
41 },
42 {
43 name: "empty",
44 plan: []PipelineStage{{}, {&PipelineTask{}}},
45 want: false,
46 },
47 }
48 for _, tt := range tests {
49 t.Run(tt.name, func(t *testing.T) {
50 t.Log("length of plan is", len(tt.plan))
51 assert.Equalf(t, tt.want, tt.plan.IsEmpty(), "IsEmpty()")
52 })
53 }
54}

Callers

nothing calls this directly

Calls 3

RunMethod · 0.80
IsEmptyMethod · 0.80
LogMethod · 0.65

Tested by

no test coverage detected