mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-19 12:57:52 +00:00
Integration tests for Redis and Memcached UI
This commit is contained in:
parent
c143eac015
commit
01cdfca7fb
@ -17,9 +17,11 @@ printf "[TEST] dvlbox-ok"
|
||||
TEST_OK="$( curl -sS localhost/index.php | grep -c 'dvlbox-ok' || true )"
|
||||
if [ "${TEST_OK}" != "${NUM_OK}" ]; then
|
||||
# 2nd Try
|
||||
sleep 1
|
||||
TEST_OK="$( curl -sS localhost/index.php | grep -c 'dvlbox-ok' || true )"
|
||||
if [ "${TEST_OK}" != "${NUM_OK}" ]; then
|
||||
# 3rd Try
|
||||
sleep 1
|
||||
TEST_OK="$( curl -sS localhost/index.php | grep -c 'dvlbox-ok' || true )"
|
||||
if [ "${TEST_OK}" != "${NUM_OK}" ]; then
|
||||
printf "\r[FAIL] dvlbox-ok\n"
|
||||
@ -45,9 +47,11 @@ printf "[TEST] dvlbox-err"
|
||||
TEST_ERR="$( curl -sS localhost/index.php | grep -c 'dvlbox-err' || true )"
|
||||
if [ "${TEST_ERR}" != "${NUM_ERR}" ]; then
|
||||
# 2nd Try
|
||||
sleep 1
|
||||
TEST_ERR="$( curl -sS localhost/index.php | grep -c 'dvlbox-err' || true )"
|
||||
if [ "${TEST_ERR}" != "${NUM_ERR}" ]; then
|
||||
# 3rd Try
|
||||
sleep 1
|
||||
TEST_ERR="$( curl -sS localhost/index.php | grep -c 'dvlbox-err' || true )"
|
||||
if [ "${TEST_ERR}" != "${NUM_ERR}" ]; then
|
||||
printf "\r[FAIL] dvlbox-err\n"
|
||||
|
26
.tests/intra-tests/memcached.sh
Executable file
26
.tests/intra-tests/memcached.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
|
||||
printf "[TEST] devilbox-version key in Memcached"
|
||||
# 1st Try
|
||||
if ! curl -sS localhost/db_memcd.php | grep -q 'devilbox-version'; then
|
||||
sleep 1
|
||||
if ! curl -sS localhost/db_memcd.php | grep -q 'devilbox-version'; then
|
||||
sleep 1
|
||||
if ! curl -sS localhost/db_memcd.php | grep -q 'devilbox-version'; then
|
||||
printf "\r[FAIL] devilbox-version key in Memcached\n"
|
||||
curl -sS localhost/db_memcd.php || true
|
||||
exit 1
|
||||
else
|
||||
printf "\r[OK] devilbox-version key in Memcached (3 rounds)\n"
|
||||
fi
|
||||
else
|
||||
printf "\r[OK] devilbox-version key in Memcached (2 rounds)\n"
|
||||
fi
|
||||
else
|
||||
printf "\r[OK] devilbox-version key in Memcached (1 round)\n"
|
||||
fi
|
26
.tests/intra-tests/redis.sh
Executable file
26
.tests/intra-tests/redis.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
|
||||
printf "[TEST] devilbox-version key in Redis"
|
||||
# 1st Try
|
||||
if ! curl -sS localhost/db_redis.php | grep -q 'devilbox-version'; then
|
||||
sleep 1
|
||||
if ! curl -sS localhost/db_redis.php | grep -q 'devilbox-version'; then
|
||||
sleep 1
|
||||
if ! curl -sS localhost/db_redis.php | grep -q 'devilbox-version'; then
|
||||
printf "\r[FAIL] devilbox-version key in Redis\n"
|
||||
curl -sS localhost/db_redis.php || true
|
||||
exit 1
|
||||
else
|
||||
printf "\r[OK] devilbox-version key in Redis (3 rounds)\n"
|
||||
fi
|
||||
else
|
||||
printf "\r[OK] devilbox-version key in Redis (2 rounds)\n"
|
||||
fi
|
||||
else
|
||||
printf "\r[OK] devilbox-version key in Redis (1 round)\n"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user