mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix test_get_yum_config
This commit is contained in:
parent
5e50ccf31c
commit
07bb453204
2 changed files with 8 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
|||
import configparser
|
||||
import logging
|
||||
import os
|
||||
from functools import wraps
|
||||
|
||||
import pytest
|
||||
|
||||
|
@ -2471,7 +2470,10 @@ def test_get_yum_config(grains):
|
|||
pytest.skip(f"{os_family} does not have yum.conf")
|
||||
setting = "cache_dir"
|
||||
if os_family == "RedHat":
|
||||
setting = "skip_if_unavailable"
|
||||
# This one seems to be in all of them...
|
||||
# If this ever breaks in the future, we'll need to get more specific
|
||||
# than os_family
|
||||
setting = "installonly_limit"
|
||||
result = yumpkg._get_yum_config()
|
||||
assert setting in result
|
||||
|
||||
|
|
|
@ -1528,11 +1528,11 @@ class VM:
|
|||
)
|
||||
)
|
||||
cmd: list[str] = [
|
||||
f'"{rsync}"',
|
||||
f'"{rsync}"' if sys.platform == "win32" else rsync,
|
||||
"-az",
|
||||
"--info=none,progress2",
|
||||
"-e",
|
||||
fr'"{ssh_cmd}"',
|
||||
f'"{ssh_cmd}"' if sys.platform == "win32" else ssh_cmd,
|
||||
]
|
||||
if rsync_flags:
|
||||
cmd.extend(rsync_flags)
|
||||
|
@ -1546,7 +1546,7 @@ class VM:
|
|||
progress = create_progress_bar(transient=True)
|
||||
task = progress.add_task(description, total=100)
|
||||
if sys.platform == "win32":
|
||||
cmd = " ".join(cmd)
|
||||
cmd = [" ".join(cmd)]
|
||||
with progress:
|
||||
proc = subprocess.Popen(cmd, bufsize=1, stdout=subprocess.PIPE, text=True)
|
||||
completed = 0
|
||||
|
@ -1589,7 +1589,7 @@ class VM:
|
|||
if TYPE_CHECKING:
|
||||
assert ssh
|
||||
_ssh_command_args = [
|
||||
f"'{ssh}'",
|
||||
ssh,
|
||||
"-F",
|
||||
str(self.ssh_config_file.relative_to(tools.utils.REPO_ROOT)),
|
||||
]
|
||||
|
|
Loading…
Add table
Reference in a new issue