Spaces:
Building
Building
Delete test_controller.py
Browse files- test_controller.py +0 -21
test_controller.py
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
from fastapi import APIRouter, HTTPException, Request, Depends
|
2 |
-
from config_provider import get_config, ServiceConfig
|
3 |
-
from service_config import ServiceConfig
|
4 |
-
import random
|
5 |
-
|
6 |
-
router = APIRouter()
|
7 |
-
|
8 |
-
@router.get("/run_all")
|
9 |
-
def run_all_tests(config: ServiceConfig = Depends(get_config)):
|
10 |
-
# Mock test results
|
11 |
-
test_results = []
|
12 |
-
for project_name in config.projects.keys():
|
13 |
-
result = {
|
14 |
-
"project": project_name,
|
15 |
-
"status": random.choice(["passed", "failed"]),
|
16 |
-
"details": f"Mock test for {project_name}"
|
17 |
-
}
|
18 |
-
test_results.append(result)
|
19 |
-
|
20 |
-
return {"results": test_results}
|
21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|