Skip to content
13 changes: 11 additions & 2 deletions st2common/bin/st2-self-check
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,27 @@ rm -R st2tests/
popd

# Retrieve test action list
TEST_ACTION_LIST=`st2 action list --pack=tests -w 90 | awk '{ print $2 }' | grep -v "|" | grep -v "ref"`
TEST_ACTION_LIST=`st2 action list --pack=tests -w 90 | awk '{ print $2 }' | grep -v "|" | grep -v "ref" | grep tests.test_`

# Run all the tests
for TEST in $TEST_ACTION_LIST
do
# If -w option is not set, skip Windows related tests
# because smbclient is not installed by default.
if [ ${RUN_WINDOWS_TESTS} = "false" ] && [ ${TEST} = "tests.test_windows_runners" ]; then
echo "Skipping ${TEST}..."
continue
fi

if [ ${RUN_WINDOWS_TESTS} = "false" ] && [ ${TEST} = "tests.test_winrm_runners" ]; then
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a heads up - that's something we missed while working on original WinRM runner PRs.

Those tests only works on servers which have access to a configured Windows host which is not the case for default StackStorm installation and st2-self-check script.

echo "Skipping ${TEST}..."
continue
fi

if [ ${RUN_WINDOWS_TESTS} = "false" ] && [ ${TEST} = "tests.test_winrm_large_script" ]; then
echo "Skipping ${TEST}..."
continue
fi

# Skip Mistral Inquiry test if we're not running Mistral tests
if [ ${RUN_MISTRAL_TESTS} = "false" ] && [ ${TEST} = "tests.test_inquiry_mistral" ]; then
echo "Skipping ${TEST}..."
Expand Down