Feature/gitops (#37)
CI Git-Pages Main / Load git-pages.gitea-env.conf to pipeline env (push) Successful in 34s
CI Main / Check existing artifact (push) Successful in 22s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 48s
CI Main / Bats tests (push) Successful in 1m34s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 1m45s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 34s
CI Git-Pages Main / Check existing artifact (push) Successful in 21s
ci-helm-build-push Helm push 0.1.5
unit-tests Bats test report
CI Git-Pages Main / Update chart to the cluster (push) Failing after 0s
ci-docker-build-push Docker push 0.2.25
CI Git-Pages Main / Report Summary (push) Successful in 7s
CI Main / Build & Push Docker (push) Successful in 44s
CI Main / GitOps (push) Failing after 22s
CI Main / Move provider version tag (push) Has been skipped
CI Main / Report Summary (push) Successful in 6s
CI Git-Pages Main / Load git-pages.gitea-env.conf to pipeline env (push) Successful in 34s
CI Main / Check existing artifact (push) Successful in 22s
CI Git-Pages Main / Build & Push Helm chart (push) Successful in 48s
CI Main / Bats tests (push) Successful in 1m34s
acc-tests Cucumber test report
CI Main / Cucumber tests (push) Successful in 1m45s
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 34s
CI Git-Pages Main / Check existing artifact (push) Successful in 21s
ci-helm-build-push Helm push 0.1.5
unit-tests Bats test report
CI Git-Pages Main / Update chart to the cluster (push) Failing after 0s
ci-docker-build-push Docker push 0.2.25
CI Git-Pages Main / Report Summary (push) Successful in 7s
CI Main / Build & Push Docker (push) Successful in 44s
CI Main / GitOps (push) Failing after 22s
CI Main / Move provider version tag (push) Has been skipped
CI Main / Report Summary (push) Successful in 6s
Co-authored-by: moilanik <niko.moilanen@tietoevry.com> Reviewed-on: #37
This commit was merged in pull request #37.
This commit is contained in:
@@ -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 || '' };
|
||||
}
|
||||
@@ -54,7 +54,7 @@ function setupMock(seqJson) {
|
||||
}
|
||||
|
||||
function runDispatch(args) {
|
||||
return bash(`export DISPATCH_POLL_INTERVAL="0.1"; bash "${DISPATCH_SCRIPT}" ${args}`);
|
||||
return bash(`export DISPATCH_ID="test123"; export DISPATCH_POLL_INTERVAL="0.1"; bash "${DISPATCH_SCRIPT}" ${args}`);
|
||||
}
|
||||
|
||||
Given('a deployment has completed in the target environment', function () {
|
||||
@@ -66,7 +66,7 @@ Given('the test project repository exists with test definitions', function () {
|
||||
When('a test workflow is dispatched to a test project', function () {
|
||||
setupMock(JSON.stringify([
|
||||
{ code: 201 },
|
||||
{ code: 200, body: { workflow_runs: [{ id: 1, status: 'running' }] } },
|
||||
{ code: 200, body: { workflow_runs: [{ id: 1, display_title: 'Workflow (test123)', run_number: 42, status: 'running' }] } },
|
||||
{ code: 200, body: { id: 1, status: 'completed', conclusion: 'success' } },
|
||||
]));
|
||||
const r = runDispatch('"test-owner/test-repo" "test.yml" "main" \'{"version":"1.2.3"}\' "http://localhost:18080" "test-token-abc123"');
|
||||
@@ -84,7 +84,7 @@ Then('the pipeline continues only after receiving a success result', function ()
|
||||
When('a test workflow is dispatched and the tests fail', function () {
|
||||
setupMock(JSON.stringify([
|
||||
{ code: 201 },
|
||||
{ code: 200, body: { workflow_runs: [{ id: 1, status: 'running' }] } },
|
||||
{ code: 200, body: { workflow_runs: [{ id: 1, display_title: 'Workflow (test123)', run_number: 42, status: 'running' }] } },
|
||||
{ code: 200, body: { id: 1, status: 'completed', conclusion: 'failure' } },
|
||||
]));
|
||||
const r = runDispatch('"test-owner/test-repo" "test.yml" "main" \'{"version":"1.2.3"}\' "http://localhost:18080" "test-token-abc123"');
|
||||
@@ -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.001"');
|
||||
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