Skip to content

Commit 5fdda21

Browse files
authored
Merge pull request #196 from StackStorm/remove-python3-skips
Remove code to skip Python 3 tests on ST2 < 3.0.1
2 parents a21657e + 30f16b6 commit 5fdda21

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

cli/test_pack_python3.bats

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
load '../test_helpers/bats-support/load'
22
load '../test_helpers/bats-assert/load'
33

4-
skip_tests_if_st2_le_v3() {
5-
# Utility function which skips tests if st2 is v3.0.0 or below. The py3 tests
6-
# here require the fix https://github.com/StackStorm/st2/pull/4674 that will
7-
# not be released until v3.0.1.
8-
9-
ST2_VER=$(st2 --version 2>&1)
10-
ST2_VER=$(echo ${ST2_VER} | cut -d',' -f1)
11-
ST2_VER=$(echo ${ST2_VER} | cut -d' ' -f2)
12-
ST2_VER=$(echo ${ST2_VER} | sed -e "s/dev/.0/g")
13-
ST2_VER=$(echo ${ST2_VER//.})
14-
15-
if [[ "${ST2_VER}" -le "300" ]]; then
16-
skip "Python 3 imports are broken on StackStorm < 3.0.1, skipping tests"
17-
fi
18-
}
19-
204
skip_tests_if_python3_is_not_available_or_if_already_running_under_python3() {
215
# Utility function which skips tests if python3 binary is not available on the system or if
226
# StackStorm components are already running under Python 3 (e.g. Ubuntu Xenial)
@@ -32,7 +16,6 @@ skip_tests_if_python3_is_not_available_or_if_already_running_under_python3() {
3216
}
3317

3418
@test "SETUP: Install and register examples pack" {
35-
skip_tests_if_st2_le_v3
3619
skip_tests_if_python3_is_not_available_or_if_already_running_under_python3
3720

3821
if [[ ! -d /opt/stackstorm/packs/examples ]]; then
@@ -49,7 +32,6 @@ skip_tests_if_python3_is_not_available_or_if_already_running_under_python3() {
4932
}
5033

5134
@test "packs.setup_virtualenv without python3 flags works and defaults to Python 2" {
52-
skip_tests_if_st2_le_v3
5335
skip_tests_if_python3_is_not_available_or_if_already_running_under_python3
5436

5537
SETUP_VENV_RESULTS=$(st2 run packs.setup_virtualenv packs=examples -j)
@@ -67,7 +49,6 @@ skip_tests_if_python3_is_not_available_or_if_already_running_under_python3() {
6749
}
6850

6951
@test "packs.setup_virtualenv with python3 flag works" {
70-
skip_tests_if_st2_le_v3
7152
skip_tests_if_python3_is_not_available_or_if_already_running_under_python3
7253

7354
SETUP_VENV_RESULTS=$(st2 run packs.setup_virtualenv packs=examples python3=true -j)
@@ -107,7 +88,6 @@ skip_tests_if_python3_is_not_available_or_if_already_running_under_python3() {
10788
}
10889

10990
@test "python3 imports work correctly" {
110-
skip_tests_if_st2_le_v3
11191
skip_tests_if_python3_is_not_available_or_if_already_running_under_python3
11292

11393
run st2 pack install python3_test --python3 -j
@@ -120,7 +100,6 @@ skip_tests_if_python3_is_not_available_or_if_already_running_under_python3() {
120100
}
121101

122102
@test "TEARDOWN: Uninstall examples and python3_test pack" {
123-
skip_tests_if_st2_le_v3
124103
skip_tests_if_python3_is_not_available_or_if_already_running_under_python3
125104

126105
if [[ -d /opt/stackstorm/packs/examples ]]; then

0 commit comments

Comments
 (0)