Fix test_win_pkg with real winrepo location

This commit is contained in:
twangboy 2024-08-21 14:36:05 -06:00 committed by Daniel Wozniak
parent 63b9da8bde
commit de33a40107
2 changed files with 4 additions and 4 deletions

View file

@ -29,7 +29,7 @@ def pkg(modules):
def test_refresh_db(pkg, pkg_def_contents, state_tree, minion_opts):
assert len(pkg.get_package_info("my-software")) == 0
repo_dir = state_tree / "win" / "repo-ng"
repo_dir = state_tree / "winrepo_ng"
with pytest.helpers.temp_file("my-software.sls", pkg_def_contents, repo_dir):
pkg.refresh_db()
assert len(pkg.get_package_info("my-software")) == 1

View file

@ -111,14 +111,14 @@ def PKG_CAP_TARGETS(grains):
@pytest.fixture
def PKG_32_TARGETS(grains):
_PKG_32_TARGETS = []
if grains["os"] == "Windows":
_PKG_32_TARGETS = ["npp", "nsis"]
elif grains["os_family"] == "RedHat" and grains["oscodename"] != "Photon":
if grains["os_family"] == "RedHat" and grains["oscodename"] != "Photon":
if grains["os"] == "CentOS":
if grains["osmajorrelease"] == 5:
_PKG_32_TARGETS = ["xz-devel.i386"]
else:
_PKG_32_TARGETS.append("xz-devel.i686")
elif grains["os"] == "Windows":
_PKG_32_TARGETS = ["npp", "nsis"]
if not _PKG_32_TARGETS:
pytest.skip("No 32 bit packages have been specified for testing")
return _PKG_32_TARGETS