@@ -137,6 +137,25 @@ func TestFullSteps(t *testing.T) {
137137 {Name : postStepName , Status : actions_model .StatusSkipped , LogIndex : 0 , LogLength : 0 , Started : 0 , Stopped : 0 },
138138 },
139139 },
140+ {
141+ name : "first step is skipped" ,
142+ task : & actions_model.ActionTask {
143+ Steps : []* actions_model.ActionTaskStep {
144+ {Status : actions_model .StatusSkipped , LogIndex : 0 , LogLength : 0 , Started : 0 , Stopped : 0 },
145+ {Status : actions_model .StatusSuccess , LogIndex : 10 , LogLength : 80 , Started : 10010 , Stopped : 10090 },
146+ },
147+ Status : actions_model .StatusSuccess ,
148+ Started : 10000 ,
149+ Stopped : 10100 ,
150+ LogLength : 100 ,
151+ },
152+ want : []* actions_model.ActionTaskStep {
153+ {Name : preStepName , Status : actions_model .StatusSuccess , LogIndex : 0 , LogLength : 10 , Started : 10000 , Stopped : 10010 },
154+ {Status : actions_model .StatusSkipped , LogIndex : 0 , LogLength : 0 , Started : 0 , Stopped : 0 },
155+ {Status : actions_model .StatusSuccess , LogIndex : 10 , LogLength : 80 , Started : 10010 , Stopped : 10090 },
156+ {Name : postStepName , Status : actions_model .StatusSuccess , LogIndex : 90 , LogLength : 10 , Started : 10090 , Stopped : 10100 },
157+ },
158+ },
140159 }
141160 for _ , tt := range tests {
142161 t .Run (tt .name , func (t * testing.T ) {
0 commit comments