docker-smoke-test.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # Simple smoke test for Docker setup
  3. set -e
  4. echo "🧪 Docker Smoke Test"
  5. echo "===================="
  6. echo ""
  7. echo "📋 1. Testing Docker Compose configuration..."
  8. docker-compose config --quiet
  9. echo "✅ Docker Compose configuration is valid"
  10. echo ""
  11. echo "📋 2. Testing container builds..."
  12. echo "Building RDMA engine container..."
  13. docker build -f Dockerfile.rdma-engine -t test-rdma-engine . > /dev/null
  14. echo "✅ RDMA engine container builds successfully"
  15. echo ""
  16. echo "📋 3. Testing basic container startup..."
  17. echo "Starting RDMA engine container..."
  18. container_id=$(docker run --rm -d --name test-rdma-engine test-rdma-engine)
  19. sleep 5
  20. if docker ps | grep test-rdma-engine > /dev/null; then
  21. echo "✅ RDMA engine container starts successfully"
  22. docker stop test-rdma-engine > /dev/null
  23. else
  24. echo "❌ RDMA engine container failed to start"
  25. echo "Checking container logs:"
  26. docker logs test-rdma-engine 2>&1 || true
  27. docker stop test-rdma-engine > /dev/null 2>&1 || true
  28. exit 1
  29. fi
  30. echo ""
  31. echo "🎉 All smoke tests passed!"
  32. echo "Docker setup is working correctly."