Ejemplo n.º 1
0
 def test_find_first_running_instance_info_named_zeoclient(self):
     test_zeoclient_port = int(os.environ.get("ZSERVER_PORT", 55001))
     self.write_zconf("zeoclient1", "1000")
     part2 = self.write_zconf("zeoclient2", test_zeoclient_port)
     self.assertEqual(
         {"port": test_zeoclient_port, "path": str(part2)}, get_running_instance(self.layer["root_path"])
     )
Ejemplo n.º 2
0
 def test_find_first_running_instance_info_with_network_interface(self):
     test_instance_port = int(os.environ.get("ZSERVER_PORT", 55001))
     self.write_zconf("instance1", "1000")
     part2 = self.write_zconf("instance2", "0.0.0.0:{0}".format(test_instance_port))
     self.assertEqual(
         {"port": test_instance_port, "path": str(part2)}, get_running_instance(self.layer["root_path"])
     )
Ejemplo n.º 3
0
 def test_find_first_running_instance_info_named_zeoclient(self):
     test_zeoclient_port = int(os.environ.get('ZSERVER_PORT', 55001))
     self.write_zconf('zeoclient1', '1000')
     part2 = self.write_zconf('zeoclient2', test_zeoclient_port)
     self.assertEqual(
         {'port': test_zeoclient_port,
          'path': str(part2)},
         get_running_instance(self.layer['root_path']))
Ejemplo n.º 4
0
 def test_find_first_running_instance_info_named_zeoclient(self):
     test_zeoclient_port = self.layer['port']
     self.write_zconf('zeoclient1', '1000')
     part2 = self.write_zconf('zeoclient2', test_zeoclient_port)
     self.assertEqual({
         'port': test_zeoclient_port,
         'path': str(part2)
     }, get_running_instance(self.layer['root_path']))
Ejemplo n.º 5
0
 def test_find_first_running_instance_info_with_network_interface(self):
     test_instance_port = int(os.environ.get('ZSERVER_PORT', 55001))
     self.write_zconf('instance1', '1000')
     part2 = self.write_zconf('instance2',
                              '0.0.0.0:{0}'.format(test_instance_port))
     self.assertEqual(
         {'port': test_instance_port,
          'path': str(part2)},
         get_running_instance(self.layer['root_path']))