summaryrefslogtreecommitdiff
path: root/src/testing/test_key_rotation.sh
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-08-23 14:14:28 +0200
committerChristian Grothoff <christian@grothoff.org>2023-08-23 14:14:33 +0200
commit7eccc771b6bd99a1feacbd4321767ae8e76e2d2c (patch)
tree55eb6e390baf0712906382f828510422605bc40a /src/testing/test_key_rotation.sh
parentc98d960d1badd1eeb834bacbc133960e2f86d304 (diff)
downloadmerchant-7eccc771b6bd99a1feacbd4321767ae8e76e2d2c.tar.gz
merchant-7eccc771b6bd99a1feacbd4321767ae8e76e2d2c.tar.bz2
merchant-7eccc771b6bd99a1feacbd4321767ae8e76e2d2c.zip
switch merchant tests to fakebank, libeufin is a dumpster on fire
Diffstat (limited to 'src/testing/test_key_rotation.sh')
-rwxr-xr-xsrc/testing/test_key_rotation.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testing/test_key_rotation.sh b/src/testing/test_key_rotation.sh
index cf270b3c..cf9b8353 100755
--- a/src/testing/test_key_rotation.sh
+++ b/src/testing/test_key_rotation.sh
@@ -49,21 +49,21 @@ function exit_fail() {
# Cleanup to run whenever we exit
function cleanup()
{
- for n in `jobs -p`
+ for n in $(jobs -p)
do
- kill $n 2> /dev/null || true
+ kill "$n" 2> /dev/null || true
done
- rm -rf $CONF $WALLET_DB $TMP_DIR
+ rm -rf "$CONF" "$WALLET_DB" "$TMP_DIR"
wait
}
# Exchange configuration file will be edited, so we create one
# from the template.
-CONF=`mktemp test_template.conf-XXXXXX`
+CONF=$(mktemp -p "${TMPDIR:-/tmp}" test_template.conf-XXXXXX)
cp test_key_rotation.conf $CONF
-TMP_DIR=`mktemp -d keys-tmp-XXXXXX`
-WALLET_DB=`mktemp test_wallet.json-XXXXXX`
+TMP_DIR=$(mktemp -p "${TMPDIR:-/tmp}" -d keys-tmp-XXXXXX)
+WALLET_DB=$(mktemp -p "${TMPDIR:-/tmp}" test_wallet.json-XXXXXX)
# Install cleanup handler (except for kill -9)
trap cleanup EXIT