Tests: unit_stop() removed where possible.

Since wait_for_record() was introduced there is no need
to stop Unit before parsing unit.log.
This commit is contained in:
Andrei Zeliankou
2021-01-12 06:20:23 +00:00
parent a0bc946db3
commit f5ac143246
6 changed files with 10 additions and 70 deletions

View File

@@ -1,7 +1,6 @@
import os
from subprocess import call
from conftest import unit_stop
from unit.applications.lang.python import TestApplicationPython
from unit.utils import waitforfiles
@@ -41,8 +40,6 @@ class TestUSR1(TestApplicationPython):
assert self.get(url='/usr1')['status'] == 200
unit_stop()
assert (
self.wait_for_record(r'"GET /usr1 HTTP/1.1" 200 0 "-" "-"', log)
is not None
@@ -74,8 +71,6 @@ class TestUSR1(TestApplicationPython):
body = 'body_for_a_log_unit'
assert self.post(body=body)['status'] == 200
unit_stop()
assert self.wait_for_record(body) is not None, 'rename new'
assert self.search_in_log(body, log_new) is None, 'rename new 2'