summaryrefslogtreecommitdiffstatshomepage
path: root/test/integration
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-15 10:43:59 +0500
committerEgor Tensin <egor@tensin.name>2026-10-15 10:43:59 +0500
commit2975025c00b64c585d424b879a21f45b2d8b2d5d (patch)
treeb75d5bd518f93596dcff9818d30e655d5cb52e92 /test/integration
parentdocs: update (diff)
downloadcgitize-2975025c00b64c585d424b879a21f45b2d8b2d5d.tar.gz
cgitize-2975025c00b64c585d424b879a21f45b2d8b2d5d.zip
t/i: fail "example" tests unless credentials are set
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/lib/example.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/integration/lib/example.sh b/test/integration/lib/example.sh
index 2dd1ad6..db62f6e 100644
--- a/test/integration/lib/example.sh
+++ b/test/integration/lib/example.sh
@@ -23,7 +23,25 @@ _test_example_setup_config() {
test_example_private_skip
}
+_check_var() {
+ local var
+ for var; do
+ if [ -z "${!var:+x}" ]; then
+ fail "Variable not set: $var"
+ return 1
+ fi
+ done
+}
+
test_example_setup() {
+ _check_var \
+ CGITIZE_GITHUB_USERNAME \
+ CGITIZE_GITHUB_TOKEN \
+ CGITIZE_BITBUCKET_EMAIL \
+ CGITIZE_BITBUCKET_TOKEN \
+ CGITIZE_GITLAB_USERNAME \
+ CGITIZE_GITLAB_TOKEN
+
test_output_dir="$test_root_dir/output"
log "Output directory: $test_output_dir"