Skip to content

Commit 46017e8

Browse files
asyash26Jenkins
authored andcommitted
gui_e2e: share remote site across piggyback-hub-conf test cases
CMK-37180 Change-Id: Idd3c37b57aff5f3c2de0bbf3e562500ab3c4d5c4
1 parent f51ce18 commit 46017e8

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

tests/system/gui/test_piggyback_hub_conf.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
)
2121
from tests.testlib.common.utils import wait_until
2222
from tests.testlib.common.utils2 import is_cleanup_enabled
23-
from tests.testlib.site import Site
23+
from tests.testlib.site import Site, SiteFactory
2424

2525
logger = logging.getLogger(__name__)
2626

@@ -30,6 +30,20 @@
3030
SITE_CONF_REL_PATH = Path("etc/omd/site.conf")
3131

3232

33+
@pytest.fixture(name="remote_site_wato_disabled", scope="module")
34+
def fixture_remote_site_wato_disabled(test_site: Site, site_factory: SiteFactory) -> Iterator[Site]:
35+
"""Return a second Checkmk site object for a distributed setup, shared across this module.
36+
37+
WATO is disabled on the remote site (disable_remote_configuration=True).
38+
39+
This overrides the function-scoped fixture of the same name from the top-level conftest.
40+
"""
41+
with site_factory.connected_remote_site(
42+
"remote", test_site, "test_piggyback_hub_conf"
43+
) as remote_site:
44+
yield remote_site
45+
46+
3347
class HubEnableActions(enum.Enum):
3448
"""The piggyback-hub can be enabled by
3549
* navigating to its specific global setting page, checking the relevant checkbox and saving

0 commit comments

Comments
 (0)