Add a test for #22010
The observed faulty state transition is probably hard to test,
because we need to hook into internal states to observe them.
Namely this:
07:30:16 | Build#ruby-2.2 enqueue: created -> pending
07:30:16 | Pipeline#32 enqueue: created -> pending
07:30:16 | Build#ruby-2.3 enqueue: created -> pending
07:30:16 | Build#ruby-2.2 run: pending -> running
07:30:16 | Pipeline#32 run: pending -> running
07:30:29 | Build#ruby-2.2 drop: running -> failed
07:30:29 | Pipeline#32 run: running -> running
07:30:29 | Build#ruby-2.3 run: pending -> running
07:30:30 | Pipeline#32 run: running -> running
07:30:57 | Build#gem:build skip: created -> skipped
07:30:57 | Pipeline#32 drop: running -> failed
07:30:57 | Build#gem:release skip: created -> skipped
07:30:57 | Pipeline#32 drop: failed -> failed
07:30:57 | Build#ruby-2.3 drop: running -> failed
07:30:57 | Pipeline#32 drop: running -> failed
^^^ Should be failed -> failed
However, the consequence of this, executing hooks twice would be
easy enough to observe. So we could at least test against this.
Keep in mind that if we ever changed how we execute the hooks
this won't be testing against faulty state transition.
Showing
Please
register
or
sign in
to comment