mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix pkg tests on arch
This commit is contained in:
parent
3b697d39a2
commit
f1d50c0ce2
1 changed files with 11 additions and 0 deletions
|
@ -4,6 +4,7 @@ tests for pkg state
|
|||
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
import pytest
|
||||
|
@ -38,6 +39,16 @@ def refresh_db(grains, modules):
|
|||
pytest.fail("Package database locked after 60 seconds, bailing out")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module", autouse=True)
|
||||
def refresh_keys(grains, modules):
|
||||
if grains["os_family"] == "Arch":
|
||||
# We should be running this periodically when building new test runner
|
||||
# images, otherwise this could take several minuets to complete.
|
||||
proc = subprocess.run(["pacman-key", "--refresh-keys"], check=False)
|
||||
if proc.returncode != 0:
|
||||
pytest.fail("pacman-key --refresh-keys command failed.")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def PKG_TARGETS(grains):
|
||||
_PKG_TARGETS = ["figlet", "sl"]
|
||||
|
|
Loading…
Add table
Reference in a new issue