11# InferaDB Integration Tests
22
3- End-to-end tests validating InferaDB Server and Management API in Kubernetes.
3+ End-to-end tests validating InferaDB Engine and Control in Kubernetes.
44
55## Quick Commands
66
@@ -31,7 +31,7 @@ cargo +nightly fmt --all
3131| ` cache_tests ` | 4 | Hit/miss patterns, expiration, concurrent load |
3232| ` concurrency_tests ` | 5 | Parallel requests, race conditions |
3333| ` e2e_workflows_tests ` | 2 | User journeys from registration to authz |
34- | ` management_integration_tests ` | 5 | Org suspension, client deactivation |
34+ | ` control_integration_tests ` | 5 | Org suspension, client deactivation |
3535| ` resilience_tests ` | 6 | Service recovery, graceful degradation |
3636
3737## Architecture
@@ -46,31 +46,32 @@ let fixture = TestFixture::create().await?;
4646// Generate JWT with scopes
4747let jwt = fixture . generate_jwt (None , & [" inferadb.check" ])? ;
4848
49- // Call server endpoint
49+ // Call engine endpoint
5050let response = fixture
51- . call_server_evaluate (& jwt , " document:1" , " viewer" , " user:alice" )
51+ . call_engine_evaluate (& jwt , " document:1" , " viewer" , " user:alice" )
5252 . await ? ;
5353
5454fixture . cleanup (). await ? ;
5555```
5656
5757### Environment Variables
5858
59- | Variable | Default | Purpose |
60- | -------------------- | ----------------------- | ------------------------ |
61- | ` SERVER_API_URL ` | ` http://localhost:8080 ` | InferaDB Server endpoint |
62- | ` MANAGEMENT_API_URL ` | ` http://localhost:8081 ` | Management API endpoint |
63- | ` TEST_TIMEOUT_SECS ` | ` 30 ` | Per-test timeout |
59+ | Variable | Default | Purpose |
60+ | ----------------- | ------------------------------ | --------------------- |
61+ | ` ENGINE_URL ` | ` http://inferadb-engine:8080 ` | Engine HTTP endpoint |
62+ | ` CONTROL_URL ` | ` http://inferadb-control:9090 ` | Control HTTP endpoint |
63+ | ` ENGINE_GRPC_URL ` | ` http://inferadb-engine:8081 ` | Engine gRPC endpoint |
64+ | ` ENGINE_MESH_URL ` | ` http://inferadb-engine:8082 ` | Engine mesh endpoint |
6465
6566### K8s Services
6667
6768Tests run against services in ` inferadb ` namespace:
6869
69- | Service | Port | Purpose |
70- | -------------- | ---- | ----------------------- |
71- | Server API | 8080 | Authorization endpoints |
72- | Management API | 8081 | Tenant/vault management |
73- | Metrics | 9090 | Prometheus metrics |
70+ | Service | Port | Purpose |
71+ | ------- | ---- | ----------------------- |
72+ | Engine | 8080 | Authorization endpoints |
73+ | Control | 9090 | Tenant/vault management |
74+ | Metrics | 9090 | Prometheus metrics |
7475
7576## Writing Tests
7677
@@ -86,7 +87,7 @@ async fn test_vault_isolation() {
8687 let jwt_b = fixture . generate_jwt (Some (vault_b ), & [" inferadb.check" ])? ;
8788
8889 // Verify isolation
89- let response = fixture . call_server_evaluate (& jwt_a , " doc:1" , " view" , " user:x" ). await ? ;
90+ let response = fixture . call_engine_evaluate (& jwt_a , " doc:1" , " view" , " user:x" ). await ? ;
9091 assert_eq! (response . status (), StatusCode :: OK );
9192
9293 fixture . cleanup (). await ? ;
@@ -99,8 +100,8 @@ async fn test_vault_isolation() {
99100| ------------------------ | ------------------------- |
100101| ` create() ` | Initialize test context |
101102| ` generate_jwt() ` | Create Ed25519-signed JWT |
102- | ` call_server_evaluate ()` | Call /v1/check endpoint |
103- | ` call_management_api ()` | Call Management API |
103+ | ` call_engine_evaluate ()` | Call /v1/check endpoint |
104+ | ` call_control_api ()` | Call Control API |
104105| ` cleanup() ` | Teardown test resources |
105106
106107## Critical Patterns
@@ -159,7 +160,7 @@ fixture.cleanup().await.expect("cleanup failed");
159160| --------------------- | ------------------------------------------------------------------------------------- |
160161| Services not starting | ` kubectl get pods -n inferadb && kubectl logs -n inferadb deployment/inferadb-engine ` |
161162| Port conflicts | ` lsof -i :8080 -i :8081 ` or ` make purge && make start ` |
162- | Tests timing out | Increase ` TEST_TIMEOUT_SECS ` , check Docker RAM (4GB+) |
163+ | Tests timing out | Check Docker RAM (4GB+ recommended), check pod logs for errors |
163164| Connection refused | Restart port-forwarding: ` make start ` |
164165
165166## Code Quality
0 commit comments