"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/unit/test_minion.py" between
salt-2019.2.0.tar.gz and salt-2019.2.1.tar.gz

About: SaltStack is a systems management software for data center automation, cloud orchestration, server provisioning, configuration management and more. Community version.

test_minion.py  (salt-2019.2.0):test_minion.py  (salt-2019.2.1)
skipping to change at line 294 skipping to change at line 294
''' '''
Tests that the resolve_dns will retry dns look ups for a maximum of Tests that the resolve_dns will retry dns look ups for a maximum of
3 times before raising a SaltMasterUnresolvableError exception. 3 times before raising a SaltMasterUnresolvableError exception.
''' '''
with patch.dict(__opts__, {'ipv6': False, 'master': 'dummy', with patch.dict(__opts__, {'ipv6': False, 'master': 'dummy',
'master_port': '4555', 'master_port': '4555',
'retry_dns': 1, 'retry_dns_count': 3}): 'retry_dns': 1, 'retry_dns_count': 3}):
self.assertRaises(SaltMasterUnresolvableError, self.assertRaises(SaltMasterUnresolvableError,
salt.minion.resolve_dns, __opts__) salt.minion.resolve_dns, __opts__)
def test_gen_modules_executors(self):
'''
Ensure gen_modules is called with the correct arguments #54429
'''
mock_opts = self.get_config('minion', from_scratch=True)
io_loop = tornado.ioloop.IOLoop()
io_loop.make_current()
minion = salt.minion.Minion(mock_opts, io_loop=io_loop)
class MockPillarCompiler(object):
def compile_pillar(self):
return {}
try:
with patch('salt.pillar.get_pillar', return_value=MockPillarCompiler
()):
with patch('salt.loader.executors') as execmock:
minion.gen_modules()
assert execmock.called_with(minion.opts, minion.functions)
finally:
minion.destroy()
@skipIf(NO_MOCK, NO_MOCK_REASON) @skipIf(NO_MOCK, NO_MOCK_REASON)
class MinionAsyncTestCase(TestCase, AdaptedConfigurationTestCaseMixin, tornado.t esting.AsyncTestCase): class MinionAsyncTestCase(TestCase, AdaptedConfigurationTestCaseMixin, tornado.t esting.AsyncTestCase):
@skip_if_not_root @skip_if_not_root
def test_sock_path_len(self): def test_sock_path_len(self):
''' '''
This tests whether or not a larger hash causes the sock path to exceed This tests whether or not a larger hash causes the sock path to exceed
the system's max sock path length. See the below link for more the system's max sock path length. See the below link for more
information. information.
 End of changes. 1 change blocks. 
0 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)