-
Notifications
You must be signed in to change notification settings - Fork 258
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip ocpapi integration tests in default test workflow (#696)
* skip ocpapi integration tests * missed conftest include
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
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
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 @@ | ||
# conftest.py | ||
|
||
import pytest | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--skip-ocpapi-integration", action="store_true", default=False, help="skip ocpapi integration tests" | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
config.addinivalue_line("markers", "ocpapi_integration: ocpapi integration test") | ||
|
||
|
||
def pytest_collection_modifyitems(config, items): | ||
if config.getoption("--skip-ocpapi-integration"): | ||
skip_ocpapi_integration = pytest.mark.skip(reason="skipping ocpapi integration") | ||
for item in items: | ||
if "ocpapi_integration_test" in item.keywords: | ||
item.add_marker(skip_ocpapi_integration) | ||
return |
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