Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chroot: add apply_, sls and highstate for state execution #55345

Merged
merged 12 commits into from
Dec 3, 2019
Prev Previous commit
Next Next commit
test_chroot: assert over cmd.run_chroot params
  • Loading branch information
aplanas committed Nov 21, 2019
commit e1fbec7fd5246177bb4d3ef2f3aaf086ee0213fa
14 changes: 12 additions & 2 deletions tests/unit/modules/test_chroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ def test_call_fails_salt_thin(self, mkdtemp, exist):
utils_mock['thin.gen_thin'].assert_called_once()
salt_mock['config.option'].assert_called()
salt_mock['archive.tar'].assert_called_once()
salt_mock['cmd.run_chroot'].assert_called_once()
salt_mock['cmd.run_chroot'].assert_called_with(
'/chroot',
['python{}'.format(sys.version_info[0]), '/tmp01/salt-call',
'--metadata', '--local',
'--log-file', '/tmp01/log', '--cachedir', '/tmp01/cache',
'--out', 'json', '-l', 'quiet', '--', 'test.ping'])
utils_mock['files.rm_rf'].assert_called_once()

@patch('salt.modules.chroot.exist')
Expand Down Expand Up @@ -181,7 +186,12 @@ def test_call_success(self, mkdtemp, exist):
utils_mock['thin.gen_thin'].assert_called_once()
salt_mock['config.option'].assert_called()
salt_mock['archive.tar'].assert_called_once()
salt_mock['cmd.run_chroot'].assert_called_once()
salt_mock['cmd.run_chroot'].assert_called_with(
'/chroot',
['python{}'.format(sys.version_info[0]), '/tmp01/salt-call',
'--metadata', '--local',
'--log-file', '/tmp01/log', '--cachedir', '/tmp01/cache',
'--out', 'json', '-l', 'quiet', '--', 'test.ping'])
utils_mock['files.rm_rf'].assert_called_once()

@patch('salt.modules.chroot.exist')
Expand Down