Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions archive/v1/scripts/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import aiohttp
import json
import sys
import aiofiles
from datetime import datetime
from typing import Dict, Any, List
import time
Expand Down Expand Up @@ -335,8 +336,8 @@ async def run_all_tests(self):
print(f" - {result['test']}: {result.get('error', 'Unknown error')}")

# Save results
with open("monitoring_test_results.json", "w") as f:
json.dump({
async with aiofiles.open("monitoring_test_results.json", "w") as f:
data = {
"timestamp": datetime.now().isoformat(),
"base_url": self.base_url,
"summary": {
Expand All @@ -345,7 +346,8 @@ async def run_all_tests(self):
"failed": failed
},
"results": self.results
}, f, indent=2)
}
await f.write(json.dumps(data, indent=2))

print("\nResults saved to monitoring_test_results.json")

Expand Down
Loading