fix fragile tests
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 19s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 2m11s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 7m10s
CI Feature / Report Summary (push) Successful in 5s

This commit is contained in:
moilanik
2026-06-20 13:34:03 +03:00
parent 0a9a9c88f1
commit a039e6637e
5 changed files with 35 additions and 15 deletions
+5 -2
View File
@@ -63,9 +63,10 @@ teardown() {
{"code":200,"body":"published"}
]'
mock_start
export GIT_PAGES_URL="http://localhost:${MOCK_PORT}"
run bash scripts/publish-git-pages.sh "unit-tests"
[ "$status" -eq 0 ]
[[ "$output" == "http://localhost:18080/test-owner/test-repo/reports/abc123de" ]]
[[ "$output" == "${GIT_PAGES_URL}/test-owner/test-repo/reports/abc123de" ]]
}
@test "publish with suite subpath" {
@@ -75,9 +76,10 @@ teardown() {
{"code":200,"body":"published"}
]'
mock_start
export GIT_PAGES_URL="http://localhost:${MOCK_PORT}"
run bash scripts/publish-git-pages.sh "sub/suite"
[ "$status" -eq 0 ]
[[ "$output" == "http://localhost:18080/test-owner/test-repo/reports/abc123de" ]]
[[ "$output" == "${GIT_PAGES_URL}/test-owner/test-repo/reports/abc123de" ]]
}
@test "git-pages returns HTTP 500 → exit 1" {
@@ -85,6 +87,7 @@ teardown() {
{"code":500,"body":"internal error"}
]'
mock_start
export GIT_PAGES_URL="http://localhost:${MOCK_PORT}"
run bash scripts/publish-git-pages.sh "unit-tests"
[ "$status" -eq 1 ]
[[ "$output" == *"500"* ]]