aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-08-01 11:38:34 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-08-01 11:38:34 +0300
commitc973015134439540d96d9d1bbee4155188f57d45 (patch)
tree2da7c325156075f81376f35dbaecfcfc52497cab /test
parenttest/integration/docker: generate new SSH keys every time (diff)
downloadcgitize-c973015134439540d96d9d1bbee4155188f57d45.tar.gz
cgitize-c973015134439540d96d9d1bbee4155188f57d45.zip
fix the lately broken --repo flag
Diffstat (limited to 'test')
-rwxr-xr-xtest/integration/example/test.sh32
1 files changed, 31 insertions, 1 deletions
diff --git a/test/integration/example/test.sh b/test/integration/example/test.sh
index 4d8ab3a..9345360 100755
--- a/test/integration/example/test.sh
+++ b/test/integration/example/test.sh
@@ -35,7 +35,7 @@ cgitize() {
echo Running cgitize
echo ----------------------------------------------------------------------
- python3 -m cgitize.main --config "$cgitize_toml_path"
+ python3 -m cgitize.main --config "$cgitize_toml_path" "$@"
}
setup_ssh() {
@@ -96,6 +96,22 @@ verify_repos() {
done
}
+verify_no_repos() {
+ local repo
+ for repo; do
+ echo
+ echo ----------------------------------------------------------------------
+ echo "Verifying repository doesn't exist: $repo"
+ echo ----------------------------------------------------------------------
+
+ local repo_dir="$output_dir/$repo"
+ if [ -e "$repo_dir" ]; then
+ echo "Exists, but it shouldn't."
+ return 1
+ fi
+ done
+}
+
test_ssh() {
echo
echo ======================================================================
@@ -124,6 +140,19 @@ test_https() {
cleanup
}
+test_one_repo() {
+ echo
+ echo ======================================================================
+ echo "${FUNCNAME[0]}"
+ echo ======================================================================
+
+ setup_https
+ cgitize --repo cef
+ verify_repos cef
+ verify_no_repos lens wintun
+ cleanup
+}
+
main() {
trap cleanup EXIT
if [ -z "${CI+y}" ]; then
@@ -132,6 +161,7 @@ main() {
test_ssh
fi
test_https
+ test_one_repo
}
main