forked from mtusi2026/mtusi2026lab6
Implement lab6 observability with OpenTelemetry and Grafana
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
"""Short acceptance: structure, public API and real telemetry. Incidents are opt-in."""
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
p=argparse.ArgumentParser(description=__doc__)
|
||||
p.add_argument('--incidents',action='store_true')
|
||||
args=p.parse_args()
|
||||
|
||||
def run(command):subprocess.run(command,cwd=ROOT,check=True)
|
||||
|
||||
if not (ROOT/'.env').exists():run([sys.executable,'scripts/setup-env.py'])
|
||||
run(['make','check','validate','lint','PYTHON='+sys.executable])
|
||||
run(['docker','compose','up','-d','--build','--wait'])
|
||||
base=os.environ.get('BASE_URL','http://localhost:8086')
|
||||
run([sys.executable,'tests/smoke.py','--base-url',base])
|
||||
run([sys.executable,'tests/observability.py','--base-url',base]+(['--incidents'] if args.incidents else []))
|
||||
Reference in New Issue
Block a user