Feature/git pages -> oma nginx perusteinen raporointipalvelu #48

Merged
niko merged 11 commits from feature/git-pages-sisäinen-toiminta-default-moodiin into main 2026-06-28 09:10:10 +03:00
Showing only changes of commit 5f98f486c6 - Show all commits
@@ -27,7 +27,7 @@ function bashQuiet(cmd) {
} }
function runReportStatus(args) { function runReportStatus(args) {
return bash(`export GITEA_API_URL="http://localhost:18080" GITEA_TOKEN="test-token-abc123" GIT_PAGES_URL="https://reports.example.com" GITHUB_REPOSITORY="test-owner/test-repo" GITHUB_SHA="abc123def456789012345678901234567890abcd" GITHUB_RUN_ID="42"; bash "${REPORT_SCRIPT}" ${args}`); return bash(`export GITEA_API_URL="http://localhost:18080" GITEA_TOKEN="test-token-abc123" GIT_PAGES_URL="https://reports.example.com" GITHUB_REPOSITORY="test-owner/test-repo" GITHUB_REF_NAME="main" GITHUB_SHA="abc123def456789012345678901234567890abcd" GITHUB_RUN_ID="42"; bash "${REPORT_SCRIPT}" ${args}`);
} }
function getMockBody() { function getMockBody() {
@@ -57,7 +57,7 @@ When('a build step completes successfully and reports its results', function ()
Then('the commit shows a success status with a clickable link to the results', function () { Then('the commit shows a success status with a clickable link to the results', function () {
const body = getMockBody(); const body = getMockBody();
if (!body.includes('"state":"success"')) throw new Error('Expected success status'); if (!body.includes('"state":"success"')) throw new Error('Expected success status');
if (!body.includes('"target_url":"https://reports.example.com/test-owner/test-repo/reports/abc123de/cucumber/"')) throw new Error('Expected URL'); if (!body.includes('"target_url":"https://reports.example.com/test-owner/test-repo/main/abc123de/cucumber/"')) throw new Error('Expected URL');
}); });
When('a build step fails', function () { When('a build step fails', function () {