-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use pytest-reportportal with backport and add unit test (#3043)
* use internal version of pytest-reportportal that removes the following patch for v1.10.0 - reportportal/agent-python-pytest#132 Fixes: #2973 Signed-off-by: Vasu Kulkarni <[email protected]>
- Loading branch information
1 parent
f847ae6
commit be6407c
Showing
7 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pre-commit==2.5.1 | ||
black==20.8b1 | ||
-e . | ||
-r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
-e git+https://github.com/vasukulkarni/[email protected]#egg=pytest-reportportal | ||
-e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters