isoja testimuutoksia
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m13s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m26s
CI Feature / Report Summary (push) Successful in 5s

This commit is contained in:
moilanik
2026-06-20 14:26:08 +03:00
parent ae03589563
commit 6a113659c8
10 changed files with 50 additions and 69 deletions
+7 -7
View File
@@ -19,7 +19,7 @@ teardown() {
{"code":200,"body":{"id":1,"status":"completed","conclusion":"success"}}
]'
mock_start
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "$GITEA_API_URL" "test-token-abc123"
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "http://localhost:18080" "test-token-abc123"
[ "$status" -eq 0 ]
}
@@ -31,7 +31,7 @@ teardown() {
{"code":200,"body":{"id":1,"status":"completed","conclusion":"failure"}}
]'
mock_start
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "$GITEA_API_URL" "test-token-abc123"
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "http://localhost:18080" "test-token-abc123"
[ "$status" -eq 1 ]
}
@@ -43,7 +43,7 @@ teardown() {
{"code":200,"body":{"id":1,"status":"completed","conclusion":"cancelled"}}
]'
mock_start
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "$GITEA_API_URL" "test-token-abc123"
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "http://localhost:18080" "test-token-abc123"
[ "$status" -eq 1 ]
}
@@ -61,7 +61,7 @@ teardown() {
{"code":200,"body":{"id":1,"status":"running"}}
]'
mock_start
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "$GITEA_API_URL" "test-token-abc123" "0.001"
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "http://localhost:18080" "test-token-abc123" "0.001"
[ "$status" -eq 124 ]
}
@@ -70,7 +70,7 @@ teardown() {
{"code":500}
]'
mock_start
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "$GITEA_API_URL" "test-token-abc123"
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "http://localhost:18080" "test-token-abc123"
[ "$status" -eq 1 ]
}
@@ -81,7 +81,7 @@ teardown() {
{"code":200,"body":{"id":1,"status":"completed","conclusion":"success"}}
]'
mock_start
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "$GITEA_API_URL" "test-token-abc123"
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{"version":"1.2.3"}' "http://localhost:18080" "test-token-abc123"
[ "$status" -eq 0 ]
path=$(mock_get_first_request_path)
[[ "$path" == *"/api/v1/repos/test-owner/test-repo/actions/workflows/test.yml/dispatches"* ]]
@@ -126,7 +126,7 @@ teardown() {
{"code":200,"body":{"workflow_runs":[]}}
]'
mock_start
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{}' "$GITEA_API_URL" "test-token-abc123"
run bash scripts/dispatch-workflow.sh "test-owner/test-repo" "test.yml" "main" '{}' "http://localhost:18080" "test-token-abc123"
[ "$status" -eq 1 ]
[[ "$output" == *"ERROR"* ]]
}