Ghost_CMS Testing - derek-hash/SYS-265-02 GitHub Wiki
Test 1: Verify the Ghost container is running
docker ps | grep ghost_cms
Test 2: Check container logs for successful startup
docker logs ghost_cms | grep "Ghost server started"
Test 3: Verify the Ghost process is listening on port 2368
sudo netstat -tuln | grep 2368
Test 4: Test HTTP connectivity to Ghost
curl -I http://172.16.1.5:2368
Test 5: Verify Ghost homepage returns valid HTML
curl -s http://172.16.1.5:2368 | grep -i "<html"
Test 6: Test connectivity to Ghost admin panel
curl -I http://172.16.1.5:2368/ghost/
Test 7: Create a REST API client to test Ghost API
Save this as test-ghost-api.sh
#!/bin/bash echo "Testing Ghost API..." response=$(curl -s http://172.16.1.5:2368/ghost/api/v3/content/settings/) if $response == "title" ; then echo "API test passed: Settings retrieved successfully" else echo "API test failed" exit 1 fi
Test 8: Verify data persistence
First, restart the container
docker restart ghost_cms
Then check if it comes back up with the same configuration
sleep 10 docker logs ghost_cms | grep "Ghost server started"
Test 9: Check resource usage
docker stats --no-stream ghost_cms