forked from mtusi2026/mtusi2026lab7
Реализация на 5
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python3
|
||||
import ssl,time,urllib.request,os
|
||||
from pathlib import Path
|
||||
root=Path(__file__).resolve().parents[1]
|
||||
ctx=ssl.create_default_context(cafile=str(root/'secrets/lab7/lb/ca.crt'))
|
||||
for _ in range(90):
|
||||
try:
|
||||
with urllib.request.urlopen(os.environ.get('LAB7_BASE_URL','https://localhost:8443')+'/health/ready',context=ctx,timeout=2) as r:
|
||||
if r.status==200:print('PASS: verified HTTPS readiness');break
|
||||
except OSError:pass
|
||||
time.sleep(1)
|
||||
else:raise SystemExit('HTTPS readiness timeout')
|
||||
Reference in New Issue
Block a user