mirror of
https://github.com/sobolevn/git-secret
synced 2024-11-12 07:10:27 +00:00
7b06b25c0a
* respect SECRETS_DIR and SECRETS_EXTENSION in tests * add line regarding fixes to CHANGELOG.md * test with non-standard SECRETS_EXTENSION * Add details about init, mention SECRETS_EXTENSION in init page * update git-secret-init man page
19 lines
676 B
Bash
Executable File
19 lines
676 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# `SECRET_PROJECT_ROOT` must be set before running the script.
|
|
|
|
set -e
|
|
|
|
# Running all the bats-tests in a dir with spaces:
|
|
cd "${SECRET_PROJECT_ROOT}"; rm -rf 'tempdir with spaces'; mkdir 'tempdir with spaces'; cd 'tempdir with spaces';
|
|
|
|
# test with non-standard SECRETS_DIR (normally .gitsecret) and SECRETS_EXTENSION (normally .secret)
|
|
export SECRETS_DIR=.gitsecret-testdir
|
|
export SECRETS_EXTENSION=.secret2
|
|
|
|
# bats expects diagnostic lines to be sent to fd 3, matching regex '^ #' (IE, like: `echo '# message here' >&3`)
|
|
# bats ... 3>&1 shows diagnostic output when errors occur.
|
|
bats "${SECRET_PROJECT_ROOT}/tests/" 3>&1
|
|
|
|
rm -rf 'tempdir with spaces'
|