This guide provides comprehensive Docker-based integration testing for the SeaweedFS RDMA sidecar system.
The Docker Compose setup includes:
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ SeaweedFS Master │ │ SeaweedFS Volume │ │ Rust RDMA │
│ :9333 │◄──►│ :8080 │ │ Engine │
└─────────────────────┘ └─────────────────────┘ └─────────────────────┘
│ │
▼ ▼
┌─────────────────────┐ ┌─────────────────────┐ ┌─────────────────────┐
│ Go RDMA Sidecar │◄──►│ Unix Socket │◄──►│ Integration │
│ :8081 │ │ /tmp/rdma.sock │ │ Test Suite │
└─────────────────────┘ └─────────────────────┘ └─────────────────────┘
# Using the helper script (recommended)
./tests/docker-test-helper.sh start
# Or using docker-compose directly
docker-compose up -d
# Run the complete test suite
./tests/docker-test-helper.sh test
# Or run tests manually
docker-compose run --rm integration-tests
# Open a shell in the test container
./tests/docker-test-helper.sh shell
# Inside the container, you can run:
./test-rdma ping
./test-rdma capabilities
./test-rdma read --volume 1 --needle 12345 --size 1024
curl http://rdma-sidecar:8081/health
curl http://rdma-sidecar:8081/stats
The docker-test-helper.sh script provides convenient commands:
# Service Management
./tests/docker-test-helper.sh start # Start all services
./tests/docker-test-helper.sh stop # Stop all services
./tests/docker-test-helper.sh clean # Stop and clean volumes
# Testing
./tests/docker-test-helper.sh test # Run integration tests
./tests/docker-test-helper.sh shell # Interactive testing shell
# Monitoring
./tests/docker-test-helper.sh status # Check service health
./tests/docker-test-helper.sh logs # Show all logs
./tests/docker-test-helper.sh logs rdma-engine # Show specific service logs
The integration test suite covers:
/cluster/statusmaster-data/statusvolume-data/tmp/rdma-engine.sock/health/stats, /read, /benchmark===============================================
🚀 SEAWEEDFS RDMA INTEGRATION TEST SUITE
===============================================
🔵 Waiting for SeaweedFS Master to be ready...
✅ SeaweedFS Master is ready
✅ SeaweedFS Master is leader and ready
🔵 Waiting for SeaweedFS Volume Server to be ready...
✅ SeaweedFS Volume Server is ready
Volume Server Version: 3.60
🔵 Checking RDMA engine socket...
✅ RDMA engine socket exists
🔵 Testing RDMA engine ping...
✅ RDMA engine ping successful
🔵 Waiting for RDMA Sidecar to be ready...
✅ RDMA Sidecar is ready
✅ RDMA Sidecar is healthy
RDMA Status: true
🔵 Testing needle read via sidecar...
✅ Sidecar needle read successful
⚠️ HTTP fallback used. Duration: 2.48ms
🔵 Running sidecar performance benchmark...
✅ Sidecar benchmark completed
Benchmark Results:
RDMA Operations: 5
HTTP Operations: 0
Average Latency: 2.479ms
Operations/sec: 403.2
===============================================
🎉 ALL INTEGRATION TESTS COMPLETED!
===============================================
# Check service logs
./tests/docker-test-helper.sh logs [service-name]
# Check container status
docker-compose ps
# Restart specific service
docker-compose restart [service-name]
# Check socket permissions
docker-compose exec rdma-engine ls -la /tmp/rdma/rdma-engine.sock
# Check RDMA engine logs
./tests/docker-test-helper.sh logs rdma-engine
# Test socket directly
docker-compose exec test-client ./test-rdma ping
# Test sidecar health directly
curl http://localhost:8081/health
# Check sidecar logs
./tests/docker-test-helper.sh logs rdma-sidecar
# Verify environment variables
docker-compose exec rdma-sidecar env | grep RDMA
# Check SeaweedFS status
curl http://localhost:9333/cluster/status
curl http://localhost:8080/status
# Check volume server logs
./tests/docker-test-helper.sh logs seaweedfs-volume
# Enter test container
./tests/docker-test-helper.sh shell
# Test RDMA operations
./test-rdma ping --socket /tmp/rdma-engine.sock
./test-rdma capabilities --socket /tmp/rdma-engine.sock
./test-rdma read --socket /tmp/rdma-engine.sock --volume 1 --needle 12345
./test-rdma bench --socket /tmp/rdma-engine.sock --iterations 10
# Health and status
curl http://rdma-sidecar:8081/health | jq '.'
curl http://rdma-sidecar:8081/stats | jq '.'
# Needle operations
curl "http://rdma-sidecar:8081/read?volume=1&needle=12345&size=1024" | jq '.'
# Benchmarking
curl "http://rdma-sidecar:8081/benchmark?iterations=5&size=2048" | jq '.benchmark_results'
# Check cluster status
curl http://seaweedfs-master:9333/cluster/status | jq '.'
# Check volume status
curl http://seaweedfs-volume:8080/status | jq '.'
# List volumes
curl http://seaweedfs-master:9333/vol/status | jq '.'
This Docker setup can be adapted for production by:
real-ucx feature in Rust🐳 Happy Docker Testing!
For issues or questions, please check the logs first and refer to the troubleshooting section above.