aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/integration/local/test.sh
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2024-06-23 19:28:48 +0200
committerEgor Tensin <egor@tensin.name>2024-06-23 19:51:49 +0200
commited43ef1ff97b6fd6e2333ecc55d5f7d8449dd712 (patch)
treefea0167646232647ff8bd2dac966b498e5a03963 /test/integration/local/test.sh
parentrequirements.txt: bump dependencies (diff)
downloadcgitize-ed43ef1ff97b6fd6e2333ecc55d5f7d8449dd712.tar.gz
cgitize-ed43ef1ff97b6fd6e2333ecc55d5f7d8449dd712.zip
include error.html in the frontend to signal errors
Diffstat (limited to '')
-rwxr-xr-xtest/integration/local/test.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/integration/local/test.sh b/test/integration/local/test.sh
index 96ab2c5..dbed2e1 100755
--- a/test/integration/local/test.sh
+++ b/test/integration/local/test.sh
@@ -179,6 +179,26 @@ verify_added_commits() {
verify_commits 'first commit' 'second commit' 'third commit'
}
+verify_error_header_empty() {
+ echo
+ echo ----------------------------------------------------------------------
+ echo Verifying the error header
+ echo ----------------------------------------------------------------------
+
+ test ! -s "$output_dir/error.html"
+}
+
+verify_error_header() {
+ echo
+ echo ----------------------------------------------------------------------
+ echo Verifying the error header
+ echo ----------------------------------------------------------------------
+
+ local contents
+ contents="$( cat -- "$output_dir/error.html" )"
+ check_contains "$contents" "Some repositories couldn't be updated"
+}
+
test_bare() {
echo
echo ======================================================================
@@ -191,6 +211,7 @@ test_bare() {
add_commits
cgitize
verify_added_commits
+ verify_error_header_empty
cleanup
success
}
@@ -207,6 +228,7 @@ test_workdir() {
add_commits
cgitize
verify_added_commits
+ verify_error_header_empty
cleanup
success
}
@@ -237,6 +259,7 @@ test_failure() {
echo "The added commits should not have been pulled." >&2
return 1
fi
+ verify_error_header
cleanup
success
}