env conf ylimääräinen value pois
CI / load-config (push) Successful in 12s
ci-cucumber Cucumber tests passed
ci-bats Bats tests
ci-build Build complete
CI / feature (push) Successful in 2m21s
CI / main (push) Has been skipped

This commit is contained in:
moilanik
2026-06-13 19:58:06 +03:00
parent 7b99392dd7
commit 09da2a7f28
13 changed files with 52 additions and 52 deletions
+6 -14
View File
@@ -3,8 +3,7 @@
setup() {
source tests/helpers/mock-api.sh
export GITEA_API_URL="http://localhost:18080"
export PAGES_HOST="reports.example.com"
export GIT_PAGES_PUBLISH_URL="http://localhost:18080/"
export GIT_PAGES_URL="http://localhost:18080"
export GIT_PAGES_PUBLISH_TOKEN="publish-token-abc"
export GITHUB_REPOSITORY="test-owner/test-repo"
export GITHUB_SHA="abc123def456789012345678901234567890abcd"
@@ -32,18 +31,11 @@ teardown() {
[[ "$output" == *"GITEA_API_URL"* ]]
}
@test "missing PAGES_HOST → exit 1" {
unset PAGES_HOST
@test "missing GIT_PAGES_URL → exit 1" {
unset GIT_PAGES_URL
run bash scripts/publish-git-pages.sh "unit-tests"
[ "$status" -eq 1 ]
[[ "$output" == *"PAGES_HOST"* ]]
}
@test "missing GIT_PAGES_PUBLISH_URL → exit 1" {
unset GIT_PAGES_PUBLISH_URL
run bash scripts/publish-git-pages.sh "unit-tests"
[ "$status" -eq 1 ]
[[ "$output" == *"GIT_PAGES_PUBLISH_URL"* ]]
[[ "$output" == *"GIT_PAGES_URL"* ]]
}
@test "missing GIT_PAGES_PUBLISH_TOKEN → exit 1" {
@@ -73,7 +65,7 @@ teardown() {
mock_start
run bash scripts/publish-git-pages.sh "unit-tests"
[ "$status" -eq 0 ]
[[ "$output" == "https://reports.example.com/test-owner/test-repo/reports/abc123de" ]]
[[ "$output" == "http://localhost:18080/test-owner/test-repo/reports/abc123de" ]]
}
@test "publish with suite subpath" {
@@ -85,7 +77,7 @@ teardown() {
mock_start
run bash scripts/publish-git-pages.sh "sub/suite"
[ "$status" -eq 0 ]
[[ "$output" == "https://reports.example.com/test-owner/test-repo/reports/abc123de" ]]
[[ "$output" == "http://localhost:18080/test-owner/test-repo/reports/abc123de" ]]
}
@test "git-pages returns HTTP 500 → exit 1" {