feat(scripts): implement report-status.sh with bats and cucumber tests (#1)
CI — gitea-ci-library / feature (push) Failing after 0s
CI — gitea-ci-library / master (push) Has been skipped

Co-authored-by: moilanik <niko.moilanen@tietoevry.com>
Reviewed-on: #1
This commit is contained in:
2026-06-08 11:33:09 +03:00
parent 9a59cbc185
commit 1379bbf1ee
13 changed files with 1746 additions and 6 deletions
@@ -0,0 +1,28 @@
const { execSync, spawn } = require('child_process');
const { Before, After, Given } = require('@cucumber/cucumber');
const path = require('path');
const PROJECT_ROOT = path.resolve(__dirname, '..', '..', '..');
const MOCK_SCRIPT = path.join(PROJECT_ROOT, 'tests', 'helpers', 'mock-api.sh');
Before({ tags: '@mock' }, function () {
execSync(`bash -c 'source "${MOCK_SCRIPT}" && mock_start'`, {
cwd: PROJECT_ROOT,
stdio: 'ignore',
});
});
After({ tags: '@mock' }, function () {
try {
execSync(`bash -c 'source "${MOCK_SCRIPT}" && mock_stop'`, {
cwd: PROJECT_ROOT,
stdio: 'ignore',
});
} catch (_) { /* ignore */ }
});
Given('a project repository exists in Gitea', function () {
});
Given('a commit has been pushed to the repository', function () {
});