Spaces:
Running
Running
File size: 568 Bytes
391c1a5 06f85f8 391c1a5 42bac5d 391c1a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from fastapi import APIRouter, Depends
from config_provider import get_config, service_config
import random
router = APIRouter()
@router.get("/run_all")
def run_all_tests(config: ServiceConfig = Depends(get_config)):
# Mock test results
test_results = []
for project_name in config.projects.keys():
result = {
"project": project_name,
"status": random.choice(["passed", "failed"]),
"details": f"Mock test for {project_name}"
}
test_results.append(result)
return {"results": test_results}
|