clean up
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 20s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 26s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m25s
CI Feature / Report Summary (push) Successful in 5s

This commit is contained in:
moilanik
2026-06-22 06:57:09 +03:00
parent f58497f5e8
commit 84978784fe
6 changed files with 76 additions and 328 deletions
+7 -10
View File
@@ -139,10 +139,9 @@ teardown() {
mock_stop
}
@test "two commit-status calls: code-repo and gitops-repo" {
@test "one commit-status call: gitops-repo only" {
source tests/helpers/mock-api.sh
mock_set_sequence '[
{"code":201},
{"code":201}
]'
mock_start
@@ -159,14 +158,12 @@ teardown() {
export GITEA_TOKEN=test-token
run bash scripts/gitops-update.sh
[ "$status" -eq 0 ]
path1=$(mock_get_first_request_path)
body1=$(mock_get_first_request_body)
[[ "$path1" == *"/repos/niko/app/statuses/"* ]]
[[ "$body1" == *'"context":"gitops/niko/app"'* ]]
path2=$(mock_get_request_path)
body2=$(mock_get_request_body)
[[ "$path2" == *"/repos/niko/app-gitops/statuses/"* ]]
[[ "$body2" == *'"context":"source/niko/app"'* ]]
path=$(mock_get_first_request_path)
body=$(mock_get_first_request_body)
[[ "$path" == *"/repos/niko/app-gitops/statuses/"* ]]
[[ "$body" == *'"context":"app unknown"'* ]]
[[ "$body" == *'"description":"Install to dev 0.2.3"'* ]]
[[ "$body" == *'"state":"success"'* ]]
rm -f "$GIT_CALLS_FILE" "$YQ_CALLS_FILE"
mock_stop
}