Spaces:
Building
Building
File size: 632 Bytes
f9bd7e5 6aaab23 f9bd7e5 391c1a5 42bac5d 391c1a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
from fastapi import APIRouter, HTTPException, Request, Depends
from config_provider import get_config, ServiceConfig
from service_config import ServiceConfig
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}
|