From aeeba590e1d8b00a9c959e0142a8705d13d5e6e7 Mon Sep 17 00:00:00 2001 From: blag Date: Sat, 28 Nov 2020 21:58:00 -0800 Subject: [PATCH 1/5] Remove pip and virtualenv pinning for RobotFramework --- actions/setup_e2e_tests.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 25d35324..6fe7a9ba 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -130,11 +130,7 @@ sudo cp -R /usr/share/doc/st2/examples /opt/stackstorm/packs/ st2 run packs.setup_virtualenv packs=examples,tests,asserts,fixtures,webui,chatops_tests st2ctl reload --register-all -# 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 From b0dfc8bba1d6f68a35a981813c97752fb7b4afc7 Mon Sep 17 00:00:00 2001 From: blag Date: Tue, 1 Dec 2020 18:15:17 -0800 Subject: [PATCH 2/5] Install relevant Python 3 RPM/Deb packages --- actions/setup_e2e_tests.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 6fe7a9ba..8aeafcbf 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -43,10 +43,10 @@ if [[ -n "$RHTEST" ]]; then if [[ "$RHVERSION" -eq 7 ]]; then # For RHEL/CentOS 7 - sudo yum install -y python-pip jq bats + sudo yum install -y bats jq python3-pip python3-virtualenv else # For RHEL/CentOS 8 and above - sudo yum install -y python3-pip wget jq + sudo yum install -y jq python3-pip python3-virtualenv wget PIP="pip3" # bats not available in epel for EL 8, Install from npm sudo npm install --global bats @@ -63,7 +63,7 @@ elif [[ -n "$DEBTEST" ]]; then sudo systemctl restart mongod fi - sudo apt-get -q -y install build-essential jq python-pip python-dev wget + sudo apt-get -q -y install build-essential jq python3-pip python3-dev python3-venv wget # Remove bats-core if it already exists (this happens when test workflows # are re-run on a server when tests are debugged) From ad810071c306ba1c0c6dd73156f15908aaf0f2ff Mon Sep 17 00:00:00 2001 From: blag Date: Sat, 28 Nov 2020 22:10:01 -0800 Subject: [PATCH 3/5] Use Python 3 venv module to create venv --- actions/setup_e2e_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 8aeafcbf..b9798114 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -131,7 +131,7 @@ st2 run packs.setup_virtualenv packs=examples,tests,asserts,fixtures,webui,chato st2ctl reload --register-all cd st2tests -virtualenv --no-download venv +python3 -m venv venv . venv/bin/activate ${PIP} install -r test-requirements.txt From 7358636affbdccf856d3dde34d0993b0cb97be3f Mon Sep 17 00:00:00 2001 From: blag Date: Sat, 28 Nov 2020 22:11:50 -0800 Subject: [PATCH 4/5] Install testing packs with Python 3 --- actions/setup_e2e_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index b9798114..0249bfbd 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -127,7 +127,7 @@ if [ -f st2tests/conf/st2.ci.conf ]; then fi sudo cp -R /usr/share/doc/st2/examples /opt/stackstorm/packs/ -st2 run packs.setup_virtualenv packs=examples,tests,asserts,fixtures,webui,chatops_tests +st2 run packs.setup_virtualenv python3=true packs=examples,tests,asserts,fixtures,webui,chatops_tests st2ctl reload --register-all cd st2tests From a64414db1ad11d8eef6329775c3e7406f60737fb Mon Sep 17 00:00:00 2001 From: blag Date: Thu, 3 Dec 2020 11:40:59 -0800 Subject: [PATCH 5/5] Add TODO --- actions/setup_e2e_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/setup_e2e_tests.sh b/actions/setup_e2e_tests.sh index 0249bfbd..94527c1e 100644 --- a/actions/setup_e2e_tests.sh +++ b/actions/setup_e2e_tests.sh @@ -133,7 +133,7 @@ st2ctl reload --register-all cd st2tests python3 -m venv venv . venv/bin/activate -${PIP} install -r test-requirements.txt +${PIP} install -r test-requirements.txt # TODO: This should eventually use python3 -m pip # Restart st2 primarily reload the keyvalue configuration