From: Naoki Kambe Date: Tue, 6 Sep 2011 02:42:42 +0000 (+0900) Subject: [1175] send the command 'status' to the stats when it started, and X-Git-Tag: perftcpdns_before_epoll~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bd8cb42b61666342ee8bc6c33aed2a168301ff67;p=thirdparty%2Fkea.git [1175] send the command 'status' to the stats when it started, and then send the command 'shutdown', and also check each value returned by each invoked command --- diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py b/src/bin/stats/tests/b10-stats-httpd_test.py index 526d5f2603..ccadeb20fd 100644 --- a/src/bin/stats/tests/b10-stats-httpd_test.py +++ b/src/bin/stats/tests/b10-stats-httpd_test.py @@ -203,9 +203,12 @@ class TestHttpHandler(unittest.TestCase): def test_do_GET_failed1(self): + # checks status + self.assertEqual(send_command("status", "Stats"), + (0, "Stats is up. (PID " + str(os.getpid()) + ")")) # failure case(Stats is down) self.assertTrue(self.stats.running) - send_shutdown("Stats") # Stats is down + self.assertEqual(send_shutdown("Stats"), (0, None)) # Stats is down self.assertFalse(self.stats.running) self.stats_httpd.cc_session.set_timeout(milliseconds=100)