Spaces:
Building
Building
from fastapi import APIRouter, HTTPException, Request, Depends | |
from config_provider import get_config, service_config | |
from service_config import ServiceConfig | |
import random | |
router = APIRouter() | |
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} | |