Skip to content

Commit

Permalink
fix(tests): register missing helper
Browse files Browse the repository at this point in the history
  • Loading branch information
blu-base committed Apr 29, 2024
1 parent 217634d commit 9014539
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ def session_master_config_overrides(request, salt_api_port, salt_api_backend):
}


@pytest.helpers.register
def remove_stale_minion_key(master, minion_id):
key_path = os.path.join(master.config["pki_dir"], "minions", minion_id)
if os.path.exists(key_path):
os.unlink(key_path)
else:
log.debug("The minion(id=%r) key was not found at %s", minion_id, key_path)


@pytest.fixture(scope='session')
def session_minion_factory(session_master_factory):
"""
Expand Down

0 comments on commit 9014539

Please sign in to comment.