Change expected output for Windows

This commit is contained in:
Twangboy 2025-01-15 14:51:14 -07:00 committed by Daniel Wozniak
parent 93acf2ee36
commit 169f0fda2f

View file

@ -34,11 +34,6 @@ def test_directory_symlink_dry_run(file, tmp_path):
Ensure that symlinks are followed when file.directory is run with
test=True
"""
if IS_WINDOWS and not os.environ.get("GITHUB_ACTIONS_PIPELINE"):
pytest.xfail(
"This test fails when running from Jenkins but not on the GitHub "
"Actions Pipeline"
)
tmp_dir = tmp_path / "pgdata"
sym_dir = tmp_path / "pg_data"
@ -57,7 +52,16 @@ def test_directory_symlink_dry_run(file, tmp_path):
ret = file.directory(
test=True, name=str(sym_dir), follow_symlinks=True, **extra_kwds
)
assert ret.result is True
expected = True
if IS_WINDOWS:
# On Windows the result is None because there would have been changes
# made to the directory (making Administrator the Owner)
# https://docs.saltproject.io/en/latest/ref/states/writing.html#return-data
expected = None
assert ret.result is expected
def _kernel_check(lookfor):