Skip to content

Investigate and possibly remove pip+virtualenv from setup_e2e_tests.sh #454

@blag

Description

@blag

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:

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.py

So 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.

setup_e2e_tests.sh:

# 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.txt

We need to investigate whether or not we can simply remove that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions