diff --git a/ocs_ci/framework/tests/order/a/test_a.py b/ocs_ci/framework/tests/order/a/test_a.py new file mode 100644 index 00000000000..25262d51ae7 --- /dev/null +++ b/ocs_ci/framework/tests/order/a/test_a.py @@ -0,0 +1,42 @@ +from os import environ +from ocs_ci.framework.pytest_customization.marks import ( + post_ocs_upgrade, + post_upgrade, + ocs_upgrade, +) + + +@post_upgrade +def test_1(): + """ + This test depends on test_e.py in folder 'e', test_z.py in folder 'z' + to test our internal upgrade ordering marks. + + Each test within specific folder 'e' and 'z' update same environment + variable 'RH' with one character in specific order to test the final + string "Red Hat". + + Any order changes will cause the environment variable to differ. + """ + + assert environ["RH"] == "Red Hat" + + +@post_ocs_upgrade +def test_2(): + """ + update environment variable 'RH' to include character "T" + final verification done in test_1. + """ + + environ["RH"] += "t" + + +@ocs_upgrade +def test_3(): + """ + update environment variable 'RH' to include character "a" + final verification done in test_1. + """ + + environ["RH"] += "a" diff --git a/ocs_ci/framework/tests/order/e/test_e.py b/ocs_ci/framework/tests/order/e/test_e.py new file mode 100644 index 00000000000..00cfa635511 --- /dev/null +++ b/ocs_ci/framework/tests/order/e/test_e.py @@ -0,0 +1,36 @@ +from os import environ +from ocs_ci.framework.pytest_customization.marks import ( + post_ocp_upgrade, + pre_ocs_upgrade, + ocp_upgrade, +) + + +@pre_ocs_upgrade +def test_4(): + """ + update environment variable 'RH' to include character "H" + final verification done in test_1 in upper level folder 'a'. + """ + + environ["RH"] += "H" + + +@post_ocp_upgrade +def test_5(): + """ + update environment variable 'RH' to include character " " + final verification done in test_1 in upper level folder 'a'. + """ + + environ["RH"] += " " + + +@ocp_upgrade +def test_6(): + """ + update environment variable 'RH' to include character "d" + final verification done in test_1 in upper level folder 'a'. + """ + + environ["RH"] += "d" diff --git a/ocs_ci/framework/tests/order/z/test_z.py b/ocs_ci/framework/tests/order/z/test_z.py new file mode 100644 index 00000000000..f0aee1b51f8 --- /dev/null +++ b/ocs_ci/framework/tests/order/z/test_z.py @@ -0,0 +1,22 @@ +from os import environ +from ocs_ci.framework.pytest_customization.marks import pre_ocp_upgrade, pre_upgrade + + +@pre_ocp_upgrade +def test_7(): + """ + update environment variable 'RH' to include character "e" + final verification done in test_1 in upper level folder 'a'. + """ + + environ["RH"] += "e" + + +@pre_upgrade +def test_8(): + """ + update environment variable 'RH' to include character "R" + final verification done in test_1 in upper level folder 'a'. + """ + + environ["RH"] = "R" diff --git a/requirements-dev.txt b/requirements-dev.txt index 84ed8d9416c..81cf1997e0b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,3 @@ pre-commit==2.5.1 black==20.8b1 --e . +-r requirements.txt diff --git a/requirements-docs.txt b/requirements-docs.txt index 802df91a5fb..97952ebd80d 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -2,4 +2,4 @@ sphinx==2.4.4 sphinx-autopackagesummary==1.3 sphinx_rtd_theme==0.5.0 recommonmark==0.6.0 --e . +-r requirements.txt diff --git a/requirements.txt b/requirements.txt index d6e1198b1ab..2ab478e9e40 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ +-e git+https://github.com/vasukulkarni/agent-python-pytest@v1.10.2#egg=pytest-reportportal -e . diff --git a/setup.py b/setup.py index 8a2f01cbc87..b7a41397048 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,6 @@ "boto3==1.14.7", "munch==2.5.0", "pytest==5.3.5", - "pytest-reportportal==1.10.0", "pytest-logger==0.5.1", 'dataclasses==0.7;python_version < "3.7"', "pytest-html==2.1.1",