mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #43734 from twangboy/win_unit_test_poudriere
Fix `unit.modules.test_poudriere` for Windows
This commit is contained in:
commit
13cc27bdab
1 changed files with 6 additions and 4 deletions
|
@ -50,10 +50,12 @@ class PoudriereTestCase(TestCase, LoaderModuleMockMixin):
|
|||
'''
|
||||
Test if it make jail ``jname`` pkgng aware.
|
||||
'''
|
||||
ret1 = 'Could not create or find required directory /tmp/salt'
|
||||
ret2 = 'Looks like file /tmp/salt/salt-make.conf could not be created'
|
||||
ret3 = {'changes': 'Created /tmp/salt/salt-make.conf'}
|
||||
mock = MagicMock(return_value='/tmp/salt')
|
||||
temp_dir = os.path.join('tmp', 'salt')
|
||||
conf_file = os.path.join('tmp', 'salt', 'salt-make.conf')
|
||||
ret1 = 'Could not create or find required directory {0}'.format(temp_dir)
|
||||
ret2 = 'Looks like file {0} could not be created'.format(conf_file)
|
||||
ret3 = {'changes': 'Created {0}'.format(conf_file)}
|
||||
mock = MagicMock(return_value=temp_dir)
|
||||
mock_true = MagicMock(return_value=True)
|
||||
with patch.dict(poudriere.__salt__, {'config.option': mock,
|
||||
'file.write': mock_true}):
|
||||
|
|
Loading…
Add table
Reference in a new issue