Пример #1
0
    def test06_kill(self):
        """ Killing the process """
        pid_control = PIDControl(PID_PATH)
        pid_control.kill()

        ret = pid_control.established or pid_control.probe()
        self.assertFalse(ret)
Пример #2
0
    def test06_kill(self):
        """ Killing the process """
        pid_control = PIDControl(PID_PATH)
        pid_control.kill()

        ret = pid_control.established or pid_control.probe()
        self.assertFalse(ret)
Пример #3
0
    def test02_set_pid_false(self):
        """ Process not executed yet """

        pid_control = PIDControl(PID_PATH)

        args = ["/bin/sh"] + self.daemon.args[1:]

        ret = pid_control.set_daemon_pid(args)
        logging.getLogger().info("ret: %s" % ret)
        self.assertFalse(ret)
Пример #4
0
    def test02_set_pid_false(self):
        """ Process not executed yet """

        pid_control = PIDControl(PID_PATH)

        args = ["/bin/sh"] + self.daemon.args[1:]

        ret = pid_control.set_daemon_pid(args)
        logging.getLogger().info("ret: %s" % ret)
        self.assertFalse(ret)
Пример #5
0
    def test03_set_pid(self):
        """ Creating the PID file """

        pid_control = PIDControl(PID_PATH)
        self.daemon.execute()

        args = ["/bin/sh"] + self.daemon.args[1:]

        ret = pid_control.set_daemon_pid(args)
        logging.getLogger().info("ret: %s" % ret)
        self.assertTrue(ret)
Пример #6
0
    def test03_set_pid(self):
        """ Creating the PID file """

        pid_control = PIDControl(PID_PATH)
        self.daemon.execute()

        args = ["/bin/sh"] + self.daemon.args[1:]

        ret = pid_control.set_daemon_pid(args)
        logging.getLogger().info("ret: %s" % ret)
        self.assertTrue(ret)
Пример #7
0
 def test01_no_probe(self):
     """ Process not detected yet """
     pid_control = PIDControl(PID_PATH)
     self.assertFalse(pid_control.probe())
Пример #8
0
 def test05_established(self):
     """ Process will be detected """
     pid_control = PIDControl(PID_PATH)
     self.assertTrue(pid_control.established)
Пример #9
0
 def test04_probe(self):
     """ Process will be detected """
     pid_control = PIDControl(PID_PATH)
     self.assertTrue(pid_control.probe())
Пример #10
0
 def test04_probe(self):
     """ Process will be detected """
     pid_control = PIDControl(PID_PATH)
     self.assertTrue(pid_control.probe())
Пример #11
0
 def test01_no_probe(self):
     """ Process not detected yet """
     pid_control = PIDControl(PID_PATH)
     self.assertFalse(pid_control.probe())