Changeset 65e66c9 in mod_gnutls
- Timestamp:
- Nov 28, 2020, 3:46:31 PM (2 years ago)
- Branches:
- asyncio, master
- Children:
- 12ed912
- Parents:
- 7eb4233
- Location:
- test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mgstest/services.py
r7eb4233 r65e66c9 51 51 self.process_env = None 52 52 53 # check: functionto check if the service is up and working53 # check: coroutine to check if the service is up and working 54 54 self.check = check 55 55 … … 123 123 if self.process and self.process.returncode is not None: 124 124 return self.process.returncode 125 if self.check():125 if await self.check(): 126 126 return None 127 127 else: … … 181 181 return self.config.is_file() 182 182 183 def pidfile_check(self):183 async def pidfile_check(self): 184 184 """Default check method for ApacheService, waits for the PID file to 185 185 be present.""" -
test/runtest.py
r7eb4233 r65e66c9 65 65 66 66 67 def check_ocsp_responder():67 async def check_ocsp_responder(): 68 68 # Check if OCSP responder works 69 69 issuer_cert = 'authority/x509.pem' 70 70 check_cert = 'authority/server/x509.pem' 71 command = ['ocsptool', '--ask', '--nonce',72 '--load-issuer', issuer_cert,73 '--load-cert', check_cert]74 return subprocess.run(command).returncode== 075 76 77 def check_msva():71 proc = await asyncio.create_subprocess_exec( 72 'ocsptool', '--ask', '--nonce', 73 '--load-issuer', issuer_cert, '--load-cert', check_cert) 74 return (await proc.wait()) == 0 75 76 77 async def check_msva(): 78 78 # Check if MSVA is up 79 79 cert_file = 'authority/client/x509.pem' … … 81 81 with open(uid_file, 'r') as file: 82 82 uid = file.read().strip() 83 command = ['msva-query-agent', 'https', uid, 'x509pem', 'client'] 84 with open(cert_file, 'r') as cert: 85 return subprocess.run(command, stdin=cert).returncode == 0 83 with open(cert_file, 'r') as cert: 84 proc = await asyncio.create_subprocess_exec( 85 'msva-query-agent', 'https', uid, 'x509pem', 'client', 86 stdin=cert) 87 return (await proc.wait()) == 0 86 88 87 89
Note: See TracChangeset
for help on using the changeset viewer.