From 2975025c00b64c585d424b879a21f45b2d8b2d5d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 15 Oct 2026 10:43:59 +0500 Subject: t/i: fail "example" tests unless credentials are set --- test/integration/lib/example.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/integration/lib/example.sh') 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" -- cgit v1.3