Esempio n. 1
0
 def test_collector(self):
     mon = MonitoringCollector()
     mon.config = "config/mon1.conf"
     mon.ssh_wrapper_class = SSHEmulator
     listener = TestMonListener()
     mon.add_listener(listener)
     mon.prepare()
     mon.start()
     mon.poll()
Esempio n. 2
0
 def test_inline_config(self):
     mon = MonitoringCollector()
     conf = mon.getconfig("<Monitoring>\n<Host address='[target]'/>\n</Monitoring>", 'localhost')
     assert conf
Esempio n. 3
0
 def test_config(self):
     mon = MonitoringCollector()
     conf = mon.getconfig("config/mon1.conf", 'localhost')
     # XXX: write a better test
     assert conf
Esempio n. 4
0
 def test_collector(self):
     mon = MonitoringCollector()
     mon.config = "config/mon1.conf"
     mon.ssh_wrapper_class = SSHEmulator
     listener = TestMonListener()
     mon.add_listener(listener)
     mon.prepare()
     mon.start()
     mon.poll()
Esempio n. 5
0
 def test_inline_config(self):
     mon = MonitoringCollector()
     conf = mon.getconfig(
         "<Monitoring>\n<Host address='[target]'/>\n</Monitoring>",
         'localhost')
     assert conf
Esempio n. 6
0
 def test_config(self):
     mon = MonitoringCollector()
     conf = mon.getconfig("config/mon1.conf", 'localhost')
     # XXX: write a better test
     assert conf