[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a

Gerhard Lausser gerhard.lausser at consol.de
Tue Feb 28 22:21:51 UTC 2012


The following commit has been merged in the debian/master branch:
commit 91bb4b958c79b01313aea0e73fc84a27e31713a0
Author: Gerhard Lausser <gerhard.lausser at consol.de>
Date:   Sun Feb 19 15:16:32 2012 +0100

    Fix a bug in a problem-table-relevant test-case which did not consider host dependencies

diff --git a/test/test_livestatus.py b/test/test_livestatus.py
index dc9616c..fcd5f14 100755
--- a/test/test_livestatus.py
+++ b/test/test_livestatus.py
@@ -1629,14 +1629,27 @@ othernode;0;broker-2;7772;1
         self.update_broker()
         host = self.sched.hosts.find_by_name("test_host_0")
         host.checks_in_progress = []
-        host.act_depend_of = [] # ignore the router
+        # We need the dependency here, so comment it out!!!!!!
+        #host.act_depend_of = [] # ignore the router
         router = self.sched.hosts.find_by_name("test_router_0")
         router.checks_in_progress = []
-        router.act_depend_of = [] # ignore the router
+        #router.act_depend_of = [] # ignore the router
         svc = self.sched.services.find_srv_by_name_and_hostname("test_host_0", "test_ok_0")
         svc.checks_in_progress = []
         svc.act_depend_of = [] # no hostchecks on critical checkresults
+
+        lshost = self.livestatus_broker.rg.hosts.find_by_name("test_host_0")
+        lsrouter = self.livestatus_broker.rg.hosts.find_by_name("test_router_0")
+        lssvc = self.livestatus_broker.rg.services.find_srv_by_name_and_hostname("test_host_0", "test_ok_0")
+        print "       scheduler   livestatus"
+        print "host   %9s   %s" % (host.is_problem, lshost.is_problem)
+        print "router %9s   %s" % (router.is_problem, lsrouter.is_problem)
+        print "svc    %9s   %s" % (svc.is_problem, lssvc.is_problem)
         self.scheduler_loop(4, [[host, 2, 'DOWN'], [router, 2, 'DOWN'], [svc, 2, 'BAD']])
+        print "       scheduler   livestatus"
+        print "host   %9s   %s" % (host.is_problem, lshost.is_problem)
+        print "router %9s   %s" % (router.is_problem, lsrouter.is_problem)
+        print "svc    %9s   %s" % (svc.is_problem, lssvc.is_problem)
         print "Is router a problem?", router.is_problem, router.state, router.state_type
         print "Is host a problem?", host.is_problem, host.state, host.state_type
         print "Is service a problem?", svc.is_problem, svc.state, svc.state_type
@@ -1645,6 +1658,10 @@ othernode;0;broker-2;7772;1
         for h in self.livestatus_broker.datamgr.rg.hosts:
             print h.get_dbg_name(), h.is_problem
 
+        print "       scheduler   livestatus"
+        print "host   %9s   %s" % (host.is_problem, lshost.is_problem)
+        print "router %9s   %s" % (router.is_problem, lsrouter.is_problem)
+        print "svc    %9s   %s" % (svc.is_problem, lssvc.is_problem)
         #---------------------------------------------------------------
         # get the columns meta-table
         #---------------------------------------------------------------

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list