Files
aitbc/scripts/testing/register_test_clients.py
oib ff4554b9dd ```
chore: remove obsolete payment architecture and integration test documentation

- Remove AITBC_PAYMENT_ARCHITECTURE.md (dual-currency system documentation)
- Remove IMPLEMENTATION_COMPLETE_SUMMARY.md (integration test completion summary)
- Remove INTEGRATION_TEST_FIXES.md (test fixes documentation)
- Remove INTEGRATION_TEST_UPDATES.md (real features implementation notes)
- Remove PAYMENT_INTEGRATION_COMPLETE.md (wallet-coordinator integration docs)
- Remove WALLET_COORDINATOR_INTEGRATION.md (payment
2026-01-29 12:28:43 +01:00

57 lines
1.8 KiB
Python

#!/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 = "REDACTED_MINER_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())