Stamp release health and align preview security smoke checks
Production container deploy / production (push) Successful in 34s
Production container deploy / production (push) Successful in 34s
This commit is contained in:
1 parent
d8be62669a
commit
9b5b080e60
4 files changed
+12
-4
No files matched your search
@@ -7,6 +7,8 @@ ROOT=Path(__file__).resolve().parents[1]
|
||||
OUT=ROOT/'web-front/out'
|
||||
class Handler(SimpleHTTPRequestHandler):
|
||||
def __init__(self,*args,**kwargs):super().__init__(*args,directory=str(OUT),**kwargs)
|
||||
def do_POST(self):
|
||||
self.send_error(404)
|
||||
def do_GET(self):
|
||||
path=self.path.split('?',1)[0]
|
||||
if path=='/auto.shtml':
|
||||
|
||||
@@ -14,10 +14,10 @@ class Links(HTMLParser):
|
||||
if u.startswith('/') and not u.startswith('//'):self.urls.add(u)
|
||||
paths=['/','/about','/catalog','/guides/choose','/guides/memory-card','/guides/installation','/guides/save-video','/tools/recording-time','/health/ready','/health/live']
|
||||
results=[];discovered=set();fragments=[];documents={}
|
||||
def request(path):
|
||||
def request(path,method="GET"):
|
||||
cmd=['curl','-sS','--max-time','20','-w','\n%{http_code}']
|
||||
if args.origin:cmd+=['-k','--resolve',urlsplit(args.base).hostname+':443:'+args.origin]
|
||||
cmd+=[args.base+path]
|
||||
cmd+=['-X',method,args.base+path]
|
||||
r=subprocess.run(cmd,capture_output=True);body,code=r.stdout.rsplit(b'\n',1);return int(code),body
|
||||
for path in paths:
|
||||
code,body=request(path);assert code==200,(path,code)
|
||||
@@ -34,7 +34,8 @@ for url in sorted(discovered):
|
||||
assert frag in documents[path],(url,'missing fragment')
|
||||
for path in ['/api/videos','/_dev/showcase','/does-not-exist']:
|
||||
code,_=request(path);assert code==404,(path,code);results.append(dict(path=path,status=code))
|
||||
code,_=request('/api/videos','POST');assert code==404,code;results.append(dict(path='/api/videos',method='POST',status=code))
|
||||
code,_=request('/auto.shtml');assert code==308,code;results.append(dict(path='/auto.shtml',status=code))
|
||||
report=dict(base=args.base,origin=args.origin,tlsVerified=not bool(args.origin),checks=results,internalLinksAndAssets='passed',date='2026-10-26')
|
||||
report=dict(base=args.base,origin=args.origin,tlsVerified=(not bool(args.origin)) if args.base.startswith('https://') else None,checks=results,internalLinksAndAssets='passed',date='2026-10-26')
|
||||
if args.output:open(args.output,'w').write(json.dumps(report,ensure_ascii=False,indent=2)+'\n')
|
||||
print(json.dumps(dict(requests=len(results),status='passed',origin=args.origin)))
|
||||
Reference in new issue
Block a user