fix mock for opensuse

Opensuse needs a run_all in here, mock it so we don't see an error, and still
test the docker stuff
This commit is contained in:
Daniel Wallace 2018-01-18 10:48:07 -07:00
parent 808e26e69a
commit bd3cb47fa7
No known key found for this signature in database
GPG key ID: 5FA5E5544F010D48

View file

@ -493,10 +493,11 @@ PATCHLEVEL = 3
log.debug(
'Testing Docker cgroup substring \'%s\'', cgroup_substr)
with patch('salt.utils.fopen', mock_open(read_data=cgroup_data)):
self.assertEqual(
core._virtual({'kernel': 'Linux'}).get('virtual_subtype'),
'Docker'
)
with patch.dict(core.__salt__, {'cmd.run_all': MagicMock()}):
self.assertEqual(
core._virtual({'kernel': 'Linux'}).get('virtual_subtype'),
'Docker'
)
def _check_ipaddress(self, value, ip_v):
'''