mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Fix pkg tests on arch
This commit is contained in:
parent
cd9753ff0f
commit
f2b4410681
2 changed files with 12 additions and 1 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"]
|
||||
|
|
|
@ -20,7 +20,7 @@ pytestmark = [
|
|||
pytest.mark.skip_unless_on_linux,
|
||||
pytest.mark.skipif(
|
||||
not check_system_python_version(), reason="Needs system python >= 3.8"
|
||||
)
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue