Example #1
0
 def test_bgp_dragent_main_agent_manager(self):
     logging_str = 'neutron.agent.common.config.setup_logging'
     launcher_str = 'oslo_service.service.ServiceLauncher'
     with mock.patch(logging_str):
         with mock.patch.object(sys, 'argv') as sys_argv:
             with mock.patch(launcher_str) as launcher:
                 sys_argv.return_value = ['bgp_dragent', '--config-file',
                                          base.etcdir('neutron.conf')]
                 entry.main()
                 launcher.assert_has_calls(
                     [mock.call(cfg.CONF),
                      mock.call().launch_service(mock.ANY),
                      mock.call().wait()])
 def test_bgp_dragent_main_agent_manager(self):
     logging_str = 'neutron.agent.common.config.setup_logging'
     launcher_str = 'oslo_service.service.ServiceLauncher'
     with mock.patch(logging_str):
         with mock.patch.object(sys, 'argv') as sys_argv:
             with mock.patch(launcher_str) as launcher:
                 sys_argv.return_value = ['bgp_dragent', '--config-file',
                                          base.etcdir('neutron.conf')]
                 entry.main()
                 launcher.assert_has_calls(
                     [mock.call(cfg.CONF),
                      mock.call().launch_service(mock.ANY),
                      mock.call().wait()])
Example #3
0
def main():
    bgp_dragent.main()