Commit 93b246f4 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac565] Test processes are started just once

parent 569afbc3
......@@ -431,5 +431,30 @@ class TestStartStopProcessesBob(unittest.TestCase):
bob.config_handler({'start_auth': True, 'start_resolver': False})
def test_config_start_once(self):
Tests that a process is started only once.
# Created Bob and ensure initialization correct
bob = StartAllProcessesBob()
# Start processes (both)
bob.cfg_start_auth = True
bob.cfg_start_resolver = True
bob.start_auth = lambda:"Started auth again")
bob.start_xfrout = lambda:"Started xfrout again")
bob.start_xfrin = lambda:"Started xfrin again")
bob.start_zonemgr = lambda:"Started zonemgr again")
bob.start_resolver = lambda:"Started resolver again")
# Send again we want to start them. Should not do it, as they are.
bob.config_handler({'start_auth': True})
bob.config_handler({'start_resolver': True})
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment