Fixed .xs_id file save/restore during tests

This commit is contained in:
Russ Magee 2020-09-13 21:29:09 -07:00
parent 01aa67d1f7
commit 569230a2af
1 changed files with 6 additions and 1 deletions

View File

@ -37,8 +37,8 @@ go test -v .
############ ############
stage "Test(Authtoken)" stage "Test(Authtoken)"
############ ############
echo "Clearing test user $USER ~/.xs_id file ..."
if [ -f ~/.xs_id ]; then if [ -f ~/.xs_id ]; then
echo "Clearing test user $USER ~/.xs_id file ..."
mv ~/.xs_id ~/.xs_id.bak mv ~/.xs_id ~/.xs_id.bak
fi fi
echo "Setting dummy authtoken in ~/.xs_id ..." echo "Setting dummy authtoken in ~/.xs_id ..."
@ -53,6 +53,11 @@ else
unset tokentest unset tokentest
fi fi
if [ -f ~/.xs_id.bak ]; then
echo "Restoring test user $USER ~/.xs_id file ..."
mv ~/.xs_id.bak ~/.xs_id
fi
############ ############
stage "Test(S->C)" stage "Test(S->C)"
############ ############