commit e5a66bf51fd4c6ca328db6c239b327b82cefcfae
parent e8389190a9e44a3ef38c224a4a532ebd110ff5a0
Author: James Prestwood <prestwoj@gmail.com>
Date: Thu, 25 Feb 2021 14:00:53 -0800
auto-t: testNetconfig stop dhcpd correctly
Use stop_process instead of kill as this removes the process
from the test context.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/autotests/testNetconfig/connection_test.py b/autotests/testNetconfig/connection_test.py
@@ -70,8 +70,9 @@ class Test(unittest.TestCase):
@classmethod
def tearDownClass(cls):
IWD.clear_storage()
- cls.dhcpd_pid.kill()
- os.system('rm -rf /tmp/dhcpd.leases')
+ ctx.stop_process(cls.dhcpd_pid)
+ cls.dhcpd_pid = None
+ os.remove('/tmp/dhcpd.leases')
if __name__ == '__main__':
unittest.main(exit=True)