aboutsummaryrefslogtreecommitdiff
path: root/seaweedfs-rdma-sidecar/tests/docker-smoke-test.sh
blob: b7ad813c1abff33c3902406e1aedf4e82bb72b39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

# Simple smoke test for Docker setup
set -e

echo "๐Ÿงช Docker Smoke Test"
echo "===================="
echo ""

echo "๐Ÿ“‹ 1. Testing Docker Compose configuration..."
docker-compose config --quiet
echo "โœ… Docker Compose configuration is valid"
echo ""

echo "๐Ÿ“‹ 2. Testing container builds..."
echo "Building RDMA engine container..."
docker build -f Dockerfile.rdma-engine -t test-rdma-engine . > /dev/null
echo "โœ… RDMA engine container builds successfully"
echo ""

echo "๐Ÿ“‹ 3. Testing basic container startup..."
echo "Starting RDMA engine container..."
container_id=$(docker run --rm -d --name test-rdma-engine test-rdma-engine)
sleep 5

if docker ps | grep test-rdma-engine > /dev/null; then
    echo "โœ… RDMA engine container starts successfully"
    docker stop test-rdma-engine > /dev/null
else
    echo "โŒ RDMA engine container failed to start"
    echo "Checking container logs:"
    docker logs test-rdma-engine 2>&1 || true
    docker stop test-rdma-engine > /dev/null 2>&1 || true
    exit 1
fi
echo ""

echo "๐ŸŽ‰ All smoke tests passed!"
echo "Docker setup is working correctly."