feat(dispatch): implement dispatch-workflow.sh with dispatch, poll, and timeout
CI — gitea-ci-library / feature (push) Failing after 1s
CI — gitea-ci-library / master (push) Has been skipped

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.
This commit is contained in:
moilanik
2026-06-08 16:07:35 +03:00
parent dcc51f9f5c
commit 00b99f3841
8 changed files with 460 additions and 19 deletions
+3 -3
View File
@@ -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