feat(dispatch): implement dispatch-workflow.sh with dispatch, poll, and timeout (#4)
Add dispatch-workflow.sh script that dispatches a Gitea workflow in another repository and polls synchronously for completion. Refactor mock-api.sh to use Python3 HTTP server with sequence support, enabling stateful poll-response simulation in tests. --------- Co-authored-by: moilanik <niko.moilanen@tietoevry.com> Reviewed-on: #4
This commit is contained in:
@@ -11,18 +11,18 @@ Feature: Test execution
|
||||
# Ticket 0002: dispatch-workflow.sh — Dispatching and polling workflows
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@ticket-0002 @mock @wip @real
|
||||
@ticket-0002 @mock @real
|
||||
Scenario: Dispatch a test workflow and wait for its completion
|
||||
When a test workflow is dispatched to a test project
|
||||
Then the pipeline waits until the test workflow finishes
|
||||
And the pipeline continues only after receiving a success result
|
||||
|
||||
@ticket-0002 @mock @wip @real
|
||||
@ticket-0002 @mock @real
|
||||
Scenario: Dispatch fails when the dispatched test workflow fails
|
||||
When a test workflow is dispatched and the tests fail
|
||||
Then the calling pipeline reports failure
|
||||
|
||||
@ticket-0002 @mock @wip
|
||||
@ticket-0002 @mock
|
||||
Scenario: Dispatch times out when the test workflow takes too long
|
||||
When a test workflow is dispatched but does not finish within the allowed time
|
||||
Then the calling pipeline reports a timeout error
|
||||
|
||||
Reference in New Issue
Block a user