Skip to content

Commit b081a95

Browse files
mkudlejmdujava
authored andcommitted
Merge pull request #878 from mdujava/toolbox_cli_parallel
Make toolbox cli tests run on other workers
2 parents 9cbe126 + bcc81a2 commit b081a95

20 files changed

+74
-5
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ ui: pipenv check-secrets.yaml
104104
$(PYTEST) --ui $(flags) testsuite/tests/ui
105105

106106
toolbox: pipenv check-secrets.yaml
107-
$(PYTEST) --toolbox $(flags) testsuite/tests/toolbox
107+
$(PYTEST) -n4 --dist loadgroup --toolbox $(flags) testsuite/tests/toolbox
108108

109109
test-images:
110110
$(PYTEST) --images $(flags) testsuite/tests/images

config/settings.yaml.tpl

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ default:
3939
threescale:
4040
name: "{DEFAULT_OPENSHIFT_THREESCALE_PROJECT}"
4141
rhsso:
42+
kind: rhbk # rhbk is deault; other acceptable value is rhsso
4243
test_user:
4344
username: testUser
4445
password: testUser

testsuite/tests/toolbox/test_account.py

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
from testsuite.toolbox import toolbox
88

9+
pytestmark = [
10+
pytest.mark.xdist_group(name="toolbox"),
11+
]
12+
913

1014
@pytest.fixture(scope="module")
1115
def create_cmd(threescale_src1):

testsuite/tests/toolbox/test_activedoc.py

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111

1212
SWAGGER_LINK = "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v2.0/json/petstore.json"
1313

14+
pytestmark = [
15+
pytest.mark.xdist_group(name="toolbox"),
16+
]
17+
1418

1519
@pytest.fixture(scope="module")
1620
def my_app_plan(request, custom_app_plan, service):

testsuite/tests/toolbox/test_app_plans.py

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
from testsuite.utils import blame
1515
from testsuite import rawobj
1616

17+
pytestmark = [
18+
pytest.mark.xdist_group(name="toolbox"),
19+
]
20+
1721

1822
@pytest.fixture(scope="module")
1923
def service(request, custom_service):

testsuite/tests/toolbox/test_application.py

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
from testsuite.utils import blame
1010
from testsuite import rawobj
1111

12+
pytestmark = [
13+
pytest.mark.xdist_group(name="toolbox"),
14+
]
15+
1216

1317
@pytest.fixture(scope="module")
1418
def my_services(custom_service, service, request):

testsuite/tests/toolbox/test_backend.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
import testsuite.utils
1313
from testsuite import TESTED_VERSION # noqa # pylint: disable=unused-import
1414

15-
pytestmark = pytest.mark.skipif("TESTED_VERSION < Version('2.7')")
15+
pytestmark = [
16+
pytest.mark.skipif("TESTED_VERSION < Version('2.7')"),
17+
pytest.mark.xdist_group(name="toolbox"),
18+
]
19+
1620

1721
HTTP_METHODS = ["GET", "POST", "PUT", "DELETE", "HEAD", "OPTIONS", "PATCH"]
1822
# 'TRACE', 'CONNECT' are not supported by 3scale

testsuite/tests/toolbox/test_cli.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
from testsuite.toolbox import toolbox
1010
from testsuite import TESTED_VERSION # noqa # pylint: disable=unused-import
1111

12-
pytestmark = pytest.mark.skipif("TESTED_VERSION < Version('2.7')")
12+
pytestmark = [
13+
pytest.mark.skipif("TESTED_VERSION < Version('2.7')"),
14+
]
1315

1416
# removed 'update' as unsupported command
1517

testsuite/tests/toolbox/test_method.py

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
from testsuite.toolbox import constants
1212
from testsuite.toolbox import toolbox
1313

14+
pytestmark = [
15+
pytest.mark.xdist_group(name="toolbox"),
16+
]
17+
1418

1519
@pytest.fixture(scope="module")
1620
def hits(request, service):

testsuite/tests/toolbox/test_metric.py

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
from testsuite.toolbox import constants
1212
from testsuite.toolbox import toolbox
1313

14+
pytestmark = [
15+
pytest.mark.xdist_group(name="toolbox"),
16+
]
17+
1418

1519
@pytest.fixture(scope="module")
1620
def metric_obj(request, service):

testsuite/tests/toolbox/test_openapi.py

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
from testsuite.toolbox import toolbox
1717
from testsuite.utils import blame
1818

19+
pytestmark = [
20+
pytest.mark.xdist_group(name="toolbox"),
21+
]
22+
1923
# authentization in 3scale and mapping to OAS(http://spec.openapis.org/oas/v3.0.3#security-scheme-object):
2024
#
2125
# - 1 token -> see uber.json

testsuite/tests/toolbox/test_policies_imp_exp.py

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
from testsuite.config import settings
99
from testsuite.toolbox import toolbox
1010

11+
pytestmark = [
12+
pytest.mark.xdist_group(name="toolbox"),
13+
]
14+
1115

1216
@pytest.fixture(scope="module")
1317
def policy_file(policy_configs):

testsuite/tests/toolbox/test_product_backend_exp.py

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
from testsuite.utils import blame
1111
from testsuite import rawobj
1212

13+
pytestmark = [
14+
pytest.mark.xdist_group(name="toolbox"),
15+
]
16+
1317

1418
@pytest.fixture(scope="module")
1519
def export_import_file():

testsuite/tests/toolbox/test_product_copy.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
from testsuite.utils import blame, blame_desc
1010
from testsuite import rawobj, TESTED_VERSION # noqa # pylint: disable=unused-import
1111

12-
pytestmark = pytest.mark.skipif("TESTED_VERSION < Version('2.7')")
12+
pytestmark = [
13+
pytest.mark.skipif("TESTED_VERSION < Version('2.7')"),
14+
pytest.mark.xdist_group(name="toolbox"),
15+
]
1316

1417

1518
@pytest.fixture(scope="module", params=["copy_service", "product_copy", "service_copy"])

testsuite/tests/toolbox/test_product_update.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
from testsuite.utils import blame, blame_desc
1010
from testsuite import rawobj, TESTED_VERSION # noqa # pylint: disable=unused-import
1111

12-
pytestmark = pytest.mark.skipif("TESTED_VERSION < Version('2.7')")
12+
pytestmark = [
13+
pytest.mark.skipif("TESTED_VERSION < Version('2.7')"),
14+
pytest.mark.xdist_group(name="toolbox"),
15+
]
1316

1417

1518
@pytest.fixture(scope="module", params=["product_copy", "service_copy"])

testsuite/tests/toolbox/test_proxy.py

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55

66
from testsuite.toolbox import toolbox
77

8+
pytestmark = [
9+
pytest.mark.xdist_group(name="toolbox"),
10+
]
11+
812

913
@pytest.fixture(scope="module")
1014
def create_cmd(threescale_src1):

testsuite/tests/toolbox/test_proxycfg.py

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
from testsuite import rawobj
88
from testsuite.toolbox import toolbox
99

10+
pytestmark = [
11+
pytest.mark.xdist_group(name="toolbox"),
12+
]
13+
1014

1115
@pytest.fixture(scope="module")
1216
def create_cmd(threescale_src1):

testsuite/tests/toolbox/test_remote.py

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
from testsuite.toolbox import toolbox
1010

11+
pytestmark = [
12+
pytest.mark.xdist_group(name="toolbox"),
13+
]
14+
1115

1216
EMPTY_LIST = "Empty remote list.\n"
1317

testsuite/tests/toolbox/test_service.py

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
from testsuite.toolbox import toolbox
99
from testsuite.utils import randomize
1010

11+
pytestmark = [
12+
pytest.mark.xdist_group(name="toolbox"),
13+
]
14+
1115

1216
@pytest.fixture(scope="module")
1317
def empty_list(service, create_cmd):

testsuite/tests/toolbox/test_service_csv.py

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
from testsuite.toolbox import toolbox
1111
from testsuite.utils import blame
1212

13+
pytestmark = [
14+
pytest.mark.xdist_group(name="toolbox"),
15+
]
16+
1317

1418
DATA = [
1519
"service_name",

0 commit comments

Comments
 (0)