Skip to content

Commit

Permalink
test-plugin-piggyback: improved skipping of piggyback tests.
Browse files Browse the repository at this point in the history
Skip setup & teardown steps as well of skipped `piggyback tests`.
Undesired setup & teardown steps were executed within `plugin tests`,
which resulted in CI jobs timing out.

Change-Id: I97f592e1a56928794450c5bede117d15e6db47f9
  • Loading branch information
dhsh-checkmk committed Aug 16, 2024
1 parent da9861f commit e26eae9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions tests/plugins_integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ def _get_site(request: pytest.FixtureRequest) -> Iterator[Site]:
# Todo: perform a proper site-cleanup and change this fixture's scope: CMK-18659
@pytest.fixture(name="test_site_piggyback", scope="function")
def _get_site_piggyback(request: pytest.FixtureRequest) -> Iterator[Site]:
if not request.config.getoption(name="--enable-piggyback"):
pytest.skip("Piggyback tests are not selected.")

for site in get_site_factory(prefix="PB_").get_test_site(
auto_cleanup=not checks.config.skip_cleanup
):
Expand Down
3 changes: 0 additions & 3 deletions tests/plugins_integration/test_plugin_piggyback.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ def test_plugin_piggyback(
test_site_piggyback: Site,
source_host_name: str,
dcd_connector: None,
pytestconfig: pytest.Config,
) -> None:
if not pytestconfig.getoption(name="--enable-piggyback"):
pytest.skip("Piggyback tests are not selected.")

with setup_source_host_piggyback(test_site_piggyback, source_host_name):
disk_dump = read_disk_dump(source_host_name)
Expand Down

0 comments on commit e26eae9

Please sign in to comment.