MCPcopy
hub / github.com/nektos/act / TestNewJobExecutor

Function TestNewJobExecutor

pkg/runner/job_executor_test.go:98–339  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

96}
97
98func TestNewJobExecutor(t *testing.T) {
99 table := []struct {
100 name string
101 steps []*model.Step
102 preSteps []bool
103 postSteps []bool
104 executedSteps []string
105 result string
106 hasError bool
107 }{
108 {
109 name: "zeroSteps",
110 steps: []*model.Step{},
111 preSteps: []bool{},
112 postSteps: []bool{},
113 executedSteps: []string{},
114 result: "success",
115 hasError: false,
116 },
117 {
118 name: "stepWithoutPrePost",
119 steps: []*model.Step{{
120 ID: "1",
121 }},
122 preSteps: []bool{false},
123 postSteps: []bool{false},
124 executedSteps: []string{
125 "startContainer",
126 "step1",
127 "stopContainer",
128 "interpolateOutputs",
129 "closeContainer",
130 },
131 result: "success",
132 hasError: false,
133 },
134 {
135 name: "stepWithFailure",
136 steps: []*model.Step{{
137 ID: "1",
138 }},
139 preSteps: []bool{false},
140 postSteps: []bool{false},
141 executedSteps: []string{
142 "startContainer",
143 "step1",
144 "interpolateOutputs",
145 "closeContainer",
146 },
147 result: "failure",
148 hasError: true,
149 },
150 {
151 name: "stepWithPre",
152 steps: []*model.Step{{
153 ID: "1",
154 }},
155 preSteps: []bool{true},

Callers

nothing calls this directly

Calls 5

WithJobErrorContainerFunction · 0.92
makeFunction · 0.85
newJobExecutorFunction · 0.85
OnMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…