diff --git a/core/task/state.go b/core/task/state.go index a4c80fc6..cdf5e821 100644 --- a/core/task/state.go +++ b/core/task/state.go @@ -68,7 +68,7 @@ func (s State) X(other State) State { if s == other { return s } - if s == ERROR { + if s == ERROR || other == ERROR { return ERROR } if s != other { diff --git a/core/task/state_test.go b/core/task/state_test.go index 11a9f35c..c7e1cfca 100644 --- a/core/task/state_test.go +++ b/core/task/state_test.go @@ -49,8 +49,8 @@ var _ = Describe("task state", func() { Expect(task.ERROR.X(task.RUNNING)).To(Equal(task.ERROR)) Expect(task.ERROR.X(task.INVARIANT)).To(Equal(task.ERROR)) - Expect(task.UNKNOWN.X(task.ERROR)).To(Equal(task.ERROR)) // FIXME: this fails - Expect(task.RUNNING.X(task.ERROR)).To(Equal(task.ERROR)) // FIXME: this fails + Expect(task.UNKNOWN.X(task.ERROR)).To(Equal(task.ERROR)) + Expect(task.RUNNING.X(task.ERROR)).To(Equal(task.ERROR)) Expect(task.INVARIANT.X(task.ERROR)).To(Equal(task.ERROR)) }) })