-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
Description
The pip installation and virtualenv creation in setup_e2e_tests.sh might now be superfluous, see here for context (also copied down below).
Wayyy back in the day we used RobotFramework to test ChatOps, but I ripped those out and replaced them with BATS tests, see:
- https://github.com/StackStorm/st2cd/blob/master/actions/workflows/st2_chatops_e2e_tests.yaml
- https://github.com/StackStorm/st2cd/blob/master/actions/workflows/st2_chatops_e2e_tests_with_slack.yaml
- https://github.com/StackStorm/st2cd/blob/master/actions/workflows/st2_e2e_tests.yaml (at the bottom)
And our current code runs the ChatOps tests using the virtualenv for the chatops_tests pack:
# Run the tests with Slack
# Default SLACK_WAIT_FOR_MESSAGES_TIMEOUT value is 120 (seconds)
run_with_small_timeout:
action: core.remote
input:
hosts: <% ctx().host_ip %>
timeout: 2400 # seconds
# Workaround for https://github.com/StackStorm/st2/issues/4676
# cmd: st2 run --inherit-env tests.test_aliases_with_slack
# env:
# ST2_AUTH_TOKEN: <% ctx().st2_auth_token %>
# WEBSOCKET_CLIENT_CA_BUNDLE: <% ctx().websocket %>
# SLACK_CHANNEL: <% ctx().slack_channel %>
# SLACK_BOT_USERNAME: <% ctx().slack_bot_username %>
# SLACK_USER_USERNAME: <% ctx().slack_user_username %>
# SLACK_USER_API_TOKEN: <% ctx().slack_user_api_token %>
cmd: |
export ST2_AUTH_TOKEN=<% ctx().st2_auth_token %>;
export WEBSOCKET_CLIENT_CA_BUNDLE=<% ctx().websocket %>;
export SLACK_CHANNEL=<% ctx().slack_channel %>;
export SLACK_BOT_USERNAME=<% ctx().slack_bot_username %>;
export SLACK_USER_USERNAME=<% ctx().slack_user_username %>;
export SLACK_USER_API_TOKEN=<% ctx().slack_user_api_token %>;
export SLACK_WAIT_FOR_MESSAGES_TIMEOUT=240;
. /opt/stackstorm/virtualenvs/chatops_tests/bin/activate;
python /opt/stackstorm/packs/chatops_tests/actions/test_aliases_with_slack.pySo I think this entire pip+virtualenv is now superfluous and can be removed.
If I remember correctly, we don't use RobotFramework anywhere anymore, so this looks like some cruft that needs cleaning up.
# Robotframework requirements
cd st2tests
sudo ${PIP} install --upgrade "pip>=9.0,<9.1"
sudo ${PIP} install --upgrade "virtualenv==15.1.0"
virtualenv --no-download venv
. venv/bin/activate
${PIP} install -r test-requirements.txtWe need to investigate whether or not we can simply remove that.