aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/setup.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/test/setup.sh b/test/setup.sh
index f407164..2ec49d3 100644
--- a/test/setup.sh
+++ b/test/setup.sh
@@ -41,17 +41,21 @@ export GIT_WORK_TREE="$PASSWORD_STORE_DIR"
git config --global user.email "Pass-Automated-Testing-Suite@zx2c4.com"
git config --global user.name "Pass Automated Testing Suite"
-PASS=`which pass`
-if [[ ! -e $PASS ]]; then
- echo "Could not find pass command"
- exit 1
-fi
+PASS=$(which pass)
+[[ -e $PASS ]] || error "Could not find pass command"
+
+EXPECT=$(which expect)
+[[ -e $EXPECT ]] || error "Could not find expect command"
+
+OAUTHTOOL=$(which oathtool)
+[[ -e $OAUTHTOOL ]] || error "Could not find oathtool command"
+
+GPG=$(which gpg2) || GPG=$(which gpg)
+[[ -e $GPG ]] || error "Could not find gpg command"
# Note: the assumption is the test key is unencrypted.
export GNUPGHOME="$TEST_HOME/gnupg/"
chmod 700 "$GNUPGHOME"
-GPG="gpg"
-which gpg2 &>/dev/null && GPG="gpg2"
# We don't want any currently running agent to conflict.
unset GPG_AGENT_INFO