mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #46107 from amendlik/yumpkg-assumeyes
Add --assumeyes on YUM/DNF commands
This commit is contained in:
commit
b92346645b
2 changed files with 8 additions and 8 deletions
|
@ -1025,8 +1025,8 @@ def refresh_db(**kwargs):
|
|||
|
||||
options = _get_options(**kwargs)
|
||||
|
||||
clean_cmd = [_yum(), '--quiet', 'clean', 'expire-cache']
|
||||
update_cmd = [_yum(), '--quiet', 'check-update']
|
||||
clean_cmd = [_yum(), '--quiet', '--assumeyes', 'clean', 'expire-cache']
|
||||
update_cmd = [_yum(), '--quiet', '--assumeyes', 'check-update']
|
||||
|
||||
if __grains__.get('os_family') == 'RedHat' \
|
||||
and __grains__.get('osmajorrelease') == 7:
|
||||
|
|
|
@ -311,11 +311,11 @@ class YumTestCase(TestCase, LoaderModuleMockMixin):
|
|||
fromrepo='good',
|
||||
branch='foo')
|
||||
clean_cmd.assert_called_once_with(
|
||||
['yum', '--quiet', 'clean', 'expire-cache', '--disablerepo=*',
|
||||
['yum', '--quiet', '--assumeyes', 'clean', 'expire-cache', '--disablerepo=*',
|
||||
'--enablerepo=good', '--branch=foo'],
|
||||
python_shell=False)
|
||||
update_cmd.assert_called_once_with(
|
||||
['yum', '--quiet', 'check-update',
|
||||
['yum', '--quiet', '--assumeyes', 'check-update',
|
||||
'--setopt=autocheck_running_kernel=false', '--disablerepo=*',
|
||||
'--enablerepo=good', '--branch=foo'],
|
||||
output_loglevel='trace',
|
||||
|
@ -333,11 +333,11 @@ class YumTestCase(TestCase, LoaderModuleMockMixin):
|
|||
disablerepo='bad',
|
||||
branch='foo')
|
||||
clean_cmd.assert_called_once_with(
|
||||
['yum', '--quiet', 'clean', 'expire-cache', '--disablerepo=bad',
|
||||
['yum', '--quiet', '--assumeyes', 'clean', 'expire-cache', '--disablerepo=bad',
|
||||
'--enablerepo=good', '--branch=foo'],
|
||||
python_shell=False)
|
||||
update_cmd.assert_called_once_with(
|
||||
['yum', '--quiet', 'check-update',
|
||||
['yum', '--quiet', '--assumeyes', 'check-update',
|
||||
'--setopt=autocheck_running_kernel=false', '--disablerepo=bad',
|
||||
'--enablerepo=good', '--branch=foo'],
|
||||
output_loglevel='trace',
|
||||
|
@ -354,7 +354,7 @@ class YumTestCase(TestCase, LoaderModuleMockMixin):
|
|||
fromrepo='good',
|
||||
branch='foo')
|
||||
clean_cmd.assert_called_once_with(
|
||||
['yum', '--quiet', 'clean', 'expire-cache', '--disablerepo=*',
|
||||
['yum', '--quiet', '--assumeyes', 'clean', 'expire-cache', '--disablerepo=*',
|
||||
'--enablerepo=good', '--branch=foo'],
|
||||
python_shell=False)
|
||||
|
||||
|
@ -367,7 +367,7 @@ class YumTestCase(TestCase, LoaderModuleMockMixin):
|
|||
disablerepo='bad',
|
||||
branch='foo')
|
||||
clean_cmd.assert_called_once_with(
|
||||
['yum', '--quiet', 'clean', 'expire-cache', '--disablerepo=bad',
|
||||
['yum', '--quiet', '--assumeyes', 'clean', 'expire-cache', '--disablerepo=bad',
|
||||
'--enablerepo=good', '--branch=foo'],
|
||||
python_shell=False)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue