Tests: preserving unit.log when run without restart.
Introducing "unit.log.Log" class for "unit.log" file management. Moving "findall()" function into TestApplicationProto. Using "os.kill()" to send signals.
This commit is contained in:
@@ -6,16 +6,11 @@ import subprocess
|
||||
import pytest
|
||||
|
||||
from unit.applications.tls import TestApplicationTLS
|
||||
from unit.option import option
|
||||
|
||||
|
||||
class TestTLS(TestApplicationTLS):
|
||||
prerequisites = {'modules': {'python': 'any', 'openssl': 'any'}}
|
||||
|
||||
def findall(self, pattern):
|
||||
with open(option.temp_dir + '/unit.log', 'r', errors='ignore') as f:
|
||||
return re.findall(pattern, f.read())
|
||||
|
||||
def openssl_date_to_sec_epoch(self, date):
|
||||
return self.date_to_sec_epoch(date, '%b %d %H:%M:%S %Y %Z')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user