Exemple #1
0
 def test_config_disabled(self):
     cfg = config.NodeManagerConfig()
     cfg.set('Manage', 'port', '-1')
     cfg.set('Manage', 'address', '127.0.0.1')
     self.srv = status.Server(cfg)
     self.srv.start()
     self.assertFalse(self.srv.enabled)
     self.assertFalse(getattr(self.srv, '_thread', False))
Exemple #2
0
 def __enter__(self):
     cfg = config.NodeManagerConfig()
     cfg.set('Manage', 'port', '0')
     cfg.set('Manage', 'address', '127.0.0.1')
     self.srv = status.Server(cfg)
     self.srv.start()
     addr, port = self.srv.server_address
     self.srv_base = 'http://127.0.0.1:'+str(port)
     return self