diff --git a/failure_test.go b/failure_test.go index 6cb7a51..150603a 100644 --- a/failure_test.go +++ b/failure_test.go @@ -39,21 +39,21 @@ func TestInteractiveFailure(t *testing.T) { w := workflow.New() w.OnFailure = workflow.InteractiveFailure - w.AddSteps([]*workflow.Step{ - &workflow.Step{ - Label: "fail workflow", - Run: func(c workflow.Context) error { - return errors.New("generic error") - }, + w.Start = &workflow.Step{ + Label: "fail workflow", + Run: func(c workflow.Context) error { + return errors.New("generic error") }, - &workflow.Step{ - Label: "succeed workflow", - Run: func(c workflow.Context) error { - testVar = true - return nil + DependsOn: []*workflow.Step{ + &workflow.Step{ + Label: "succeed workflow", + Run: func(c workflow.Context) error { + testVar = true + return nil + }, }, }, - }) + } err := w.Run() if err != nil {