refactor: restructure test suite

- Remove tests/production/ directory (JWT auth, production monitoring, etc.)
- Remove tests/staking/ directory
- Remove tests/services/test_staking_service.py
- Remove tests/phase1/ directory
- Remove tests/load_test.py
- Add tests/verification/ directory with 20+ new test files
- Add tests/load/locustfile.py for load testing
- Add tests/security/test_confidential_transactions.py
- Add tests/integration/test_working_integration.py
- Update docs/ for minimum Python version and paths
This commit is contained in:
aitbc
2026-04-21 21:15:27 +02:00
parent cdba253fb2
commit 14e2d96870
45 changed files with 10425 additions and 693 deletions

View File

@@ -0,0 +1,56 @@
#!/usr/bin/env python3
"""Register test clients for payment integration testing"""
import asyncio
import httpx
import json
# Configuration
COORDINATOR_URL = "http://127.0.0.1:8000/v1"
CLIENT_KEY = "test_client_key_123"
MINER_KEY = "${MINER_API_KEY}"
async def register_client():
"""Register a test client"""
async with httpx.AsyncClient() as client:
# Register client
response = await client.post(
f"{COORDINATOR_URL}/clients/register",
headers={"X-API-Key": CLIENT_KEY},
json={"name": "Test Client", "description": "Client for payment testing"}
)
print(f"Client registration: {response.status_code}")
if response.status_code not in [200, 201]:
print(f"Response: {response.text}")
else:
print("✓ Test client registered successfully")
async def register_miner():
"""Register a test miner"""
async with httpx.AsyncClient() as client:
# Register miner
response = await client.post(
f"{COORDINATOR_URL}/miners/register",
headers={"X-API-Key": MINER_KEY},
json={
"name": "Test Miner",
"description": "Miner for payment testing",
"capacity": 100,
"price_per_hour": 0.1,
"hardware": {"gpu": "RTX 4090", "memory": "24GB"}
}
)
print(f"Miner registration: {response.status_code}")
if response.status_code not in [200, 201]:
print(f"Response: {response.text}")
else:
print("✓ Test miner registered successfully")
async def main():
print("=== Registering Test Clients ===")
await register_client()
await register_miner()
print("\n✅ Test clients registered successfully!")
if __name__ == "__main__":
asyncio.run(main())