Beispiel #1
0
 def test_warn_if_not_public_addr_and_not_public_netw(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     cfg.add_section("global")
     mon.catch_mon_errors(fake_conn, self.logger, "host", cfg)
     expected_msg = "neither `public_addr` nor `public_network`"
     self.assert_logger_message(self.logger.warning, expected_msg)
Beispiel #2
0
 def test_warn_if_not_public_addr_and_not_public_netw(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     cfg.add_section('global')
     mon.catch_mon_errors(fake_conn, self.logger, 'host', cfg, Mock())
     expected_msg = 'neither `public_addr` nor `public_network`'
     self.assert_logger_message(self.logger.warning, expected_msg)
Beispiel #3
0
 def test_warn_if_host_not_in_intial_members(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     cfg.add_section("global")
     cfg.set("global", "mon initial members", "AAAA")
     mon.catch_mon_errors(fake_conn, self.logger, "host", cfg)
     expected_msg = "is not defined in `mon initial members`"
     self.assert_logger_message(self.logger.warning, expected_msg)
Beispiel #4
0
 def test_warn_if_host_not_in_intial_members(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     cfg.add_section('global')
     cfg.set('global', 'mon initial members', 'AAAA')
     mon.catch_mon_errors(fake_conn, self.logger, 'host', cfg, Mock())
     expected_msg = 'is not defined in `mon initial members`'
     self.assert_logger_message(self.logger.warning, expected_msg)
Beispiel #5
0
 def test_warn_if_not_mon_in_monmap(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     mon.catch_mon_errors(fake_conn, self.logger, "host", cfg)
     expected_msg = "does not exist in monmap"
     self.assert_logger_message(self.logger.warning, expected_msg)
Beispiel #6
0
 def test_warn_if_no_intial_members(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     mon.catch_mon_errors(fake_conn, self.logger, "host", cfg)
     expected_msg = "is not defined in `mon initial members`"
     self.assert_logger_message(self.logger.warning, expected_msg)
Beispiel #7
0
 def test_warn_if_not_mon_in_monmap(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     mon.catch_mon_errors(fake_conn, self.logger, 'host', cfg, Mock())
     expected_msg = 'does not exist in monmap'
     self.assert_logger_message(self.logger.warning, expected_msg)
Beispiel #8
0
 def test_warn_if_no_intial_members(self):
     fake_conn = make_fake_conn()
     cfg = make_fake_conf()
     mon.catch_mon_errors(fake_conn, self.logger, 'host', cfg, Mock())
     expected_msg = 'is not defined in `mon initial members`'
     self.assert_logger_message(self.logger.warning, expected_msg)