fix
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 19s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m29s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m38s
CI Feature / Report Summary (push) Successful in 5s

This commit is contained in:
moilanik
2026-06-22 07:53:38 +03:00
parent ba16e9e4eb
commit db9d6daebb
2 changed files with 12 additions and 7 deletions
@@ -15,7 +15,7 @@ function bash(cmd) {
encoding: 'utf-8',
stdio: ['pipe', 'pipe', 'pipe'],
});
return { status: 0, stdout: out };
return { status: 0, stdout: out, stderr: '' };
} catch (e) {
return { status: e.status, stdout: e.stdout || '', stderr: e.stderr || '' };
}
@@ -98,15 +98,19 @@ Then('the calling pipeline reports failure', function () {
When('a test workflow is dispatched but does not finish within the allowed time', function () {
setupMock(JSON.stringify([
{ code: 201 },
{ code: 200, body: { workflow_runs: [{ id: 1, status: 'running' }] } },
{ code: 200, body: { id: 1, status: 'running' } },
{ code: 200, body: { id: 1, status: 'running' } },
{ code: 200, body: { id: 1, status: 'running' } },
{ code: 200, body: { workflow_runs: [] } },
{ code: 200, body: { workflow_runs: [] } },
{ code: 200, body: { workflow_runs: [] } },
{ code: 200, body: { workflow_runs: [] } },
{ code: 200, body: { workflow_runs: [] } },
]));
const r = runDispatch('"test-owner/test-repo" "test.yml" "main" \'{"version":"1.2.3"}\' "http://localhost:18080" "test-token-abc123" "0.05"');
this.dispatchResult = r.status;
this.dispatchStderr = r.stderr;
});
Then('the calling pipeline reports a timeout error', function () {
if (this.dispatchResult !== 124) throw new Error(`Expected timeout exit 124, got ${this.dispatchResult}`);
if (this.dispatchResult !== 124) {
throw new Error(`Expected timeout exit 124, got ${this.dispatchResult}. stderr: ${(this.dispatchStderr || '').substring(0,300)}`);
}
});