mirror of
https://github.com/sobolevn/git-secret
synced 2024-11-08 19:10:31 +00:00
22fe1ed2d4
* Support SECRETS_VERBOSE env var in addition to -v * don't use --quiet when decrypting in verbose mode * show output of gpg encryption in verbose mode * add tests for SECRETS_VERBOSE env var set to 0 and 1 * update changelog, reorder entries. * add tests for 'cat' and 'hide' with SECRETS_VERBOSE=1
20 lines
703 B
Bash
Executable File
20 lines
703 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
|
|
#export SECRETS_VERBOSE=''
|
|
|
|
# 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'
|