Skip to content

Commit

Permalink
cli test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseGaud committed Jan 7, 2025
1 parent 80ee059 commit 8cc113f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/cli-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ set -eo pipefail
TESTS_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)
cd $TESTS_DIR/.. # make sure we're in the root

TEST_VM="15.1-arm64"
TEST_VM="d792c6f6-198c-470f-9526-9c998efe7ab4"
TEST_LOG="/tmp/test-log"

if [[ -e ~/.config/anklet/config.yml ]]; then
mv ~/.config/anklet/config.yml ~/.config/anklet/config.yml.bak
fi

if ! anka version &> /dev/null; then
echo "ERROR: Anka CLI not found"
exit 1
Expand All @@ -20,8 +24,10 @@ cleanup() {
echo "] Cleaning up..."
rm -rf dist
rm -f ~/.config/anklet/config.yml
mv ~/.config/anklet/config.yml.bak ~/.config/anklet/config.yml &> /dev/null || true
anka delete --yes "${TEST_VM}-1" &> /dev/null || true
anka delete --yes "${TEST_VM}-2" &> /dev/null || true
echo "] DONE
}
trap cleanup EXIT
Expand Down

0 comments on commit 8cc113f

Please sign in to comment.