diff --git a/tests/plugins_integration/conftest.py b/tests/plugins_integration/conftest.py index 5c156dab3ce..b9c717e2ce3 100644 --- a/tests/plugins_integration/conftest.py +++ b/tests/plugins_integration/conftest.py @@ -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 ): diff --git a/tests/plugins_integration/test_plugin_piggyback.py b/tests/plugins_integration/test_plugin_piggyback.py index f2823974960..92668f91578 100644 --- a/tests/plugins_integration/test_plugin_piggyback.py +++ b/tests/plugins_integration/test_plugin_piggyback.py @@ -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)