Skip to content

Commit

Permalink
Update tests and add a post-activation script check.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlipperPA committed Apr 3, 2023
1 parent 5473df2 commit e7c15a4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyro_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ TEST_VENV_DIR="$DIR/$TEST_VENV_NAME"
echo "Starting tests with test venv '$TEST_VENV_NAME'..."

# Test venv creation
VENV_DIR=$TEST_VENV_DIR pyro $TEST_VENV_NAME > /dev/null
VENV_DIR=$TEST_VENV_DIR pyro $TEST_VENV_NAME -c > /dev/null
if [ -d "$TEST_VENV_DIR" ]; then
echo "Testing venv creation... passed."
else
echo "Testing venv creation FAILED."
fi

# Test default post activation hook
if grep -q "# Commands to be run after" "${TEST_VENV_DIR}/post_activate.sh"; then
echo "Testing post activation default script... passed."
else
echo "Testing post activation default script FAILED."
fi

# Test venv deletion
pyro $TEST_VENV_NAME --delete > /dev/null
if [ ! -d "$TEST_VENV_DIR" ]; then
Expand Down

0 comments on commit e7c15a4

Please sign in to comment.