Skip to content

Commit

Permalink
Allow to easily override daemon config in test suite (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb authored Aug 19, 2024
1 parent e9b1022 commit 3463ca5
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions project/tests/conftest.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,29 @@ def salt_factories_config():


@pytest.fixture(scope="package")
def master(salt_factories):
return salt_factories.salt_master_daemon(random_string("master-"))
def master_config():
"""
Salt master configuration overrides for integration tests.
"""
return {}


@pytest.fixture(scope="package")
def master(salt_factories, master_config):
return salt_factories.salt_master_daemon(random_string("master-"), overrides=master_config)


@pytest.fixture(scope="package")
def minion_config():
"""
Salt minion configuration overrides for integration tests.
"""
return {}


@pytest.fixture(scope="package")
def minion(master):
return master.salt_minion_daemon(random_string("minion-"))
def minion(master, minion_config):
return master.salt_minion_daemon(random_string("minion-"), overrides=minion_config)


{%- if ssh_fixtures %}
Expand Down

0 comments on commit 3463ca5

Please sign in to comment.