auto-t: testNetconfig stop dhcpd correctly

Use stop_process instead of kill as this removes the process
from the test context.
This commit is contained in:
James Prestwood 2021-02-25 14:00:53 -08:00 committed by Denis Kenzior
parent e8389190a9
commit e5a66bf51f
1 changed files with 3 additions and 2 deletions

View File

@ -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)