diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-15 10:43:59 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-15 10:43:59 +0500 |
| commit | 2975025c00b64c585d424b879a21f45b2d8b2d5d (patch) | |
| tree | b75d5bd518f93596dcff9818d30e655d5cb52e92 /test | |
| parent | docs: update (diff) | |
| download | cgitize-2975025c00b64c585d424b879a21f45b2d8b2d5d.tar.gz cgitize-2975025c00b64c585d424b879a21f45b2d8b2d5d.zip | |
t/i: fail "example" tests unless credentials are set
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/lib/example.sh | 18 |
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" |
