File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 42
42
43
43
- name : Test Redis
44
44
run : |
45
- sleep 5
45
+ sleep 5 # Wait for Redis to fully initialize
46
46
REDIS_TEST=$(docker-compose exec -T redis redis-cli ping)
47
47
if [[ "$REDIS_TEST" != "PONG" ]]; then
48
48
echo "Redis test failed. No PONG response."
51
51
echo "Redis test successful."
52
52
fi
53
53
54
+ - name : Test MariaDB
55
+ run : |
56
+ sleep 10 # Wait for MariaDB to fully initialize
57
+ MARIADB_TEST=$(docker-compose exec -T mariadb mysql -u${MARIADB_USER} -p${MARIADB_PASSWORD} -e "SHOW DATABASES LIKE '${MARIADB_DATABASE}';")
58
+ if [[ "$MARIADB_TEST" != *"${MARIADB_DATABASE}"* ]]; then
59
+ echo "MariaDB test failed. Database not found."
60
+ exit 1
61
+ else
62
+ echo "MariaDB test successful."
63
+ fi
64
+
54
65
- name : Cleanup
55
66
run : |
56
67
docker-compose -f docker-compose.yml down
You can’t perform that action at this time.
0 commit comments