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
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:
@@ -74,7 +74,8 @@ function requestCount() {
|
||||
}
|
||||
|
||||
function gitCalls() {
|
||||
const out = bash(`cat "${GIT_CALLS_FILE || '/dev/null'}" 2>/dev/null || echo ""`).stdout;
|
||||
const callsFile = process.env.GIT_CALLS_FILE || '/dev/null';
|
||||
const out = bash(`cat "${callsFile}" 2>/dev/null || echo ""`).stdout;
|
||||
return out.split('\n').filter(l => l.length > 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -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)}`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user