Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit c24c33c

Browse files
committed
Adds redis-server-bootstrap autostart test and fixes the same for redis-server-wrapper.
1 parent a9d3b27 commit c24c33c

File tree

4 files changed

+36
-8
lines changed

4 files changed

+36
-8
lines changed

environment.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ NO_CACHE ?= false
3434
DIST_PATH ?= ./dist
3535

3636
# Number of seconds expected to complete container startup including bootstrap.
37-
STARTUP_TIME ?= 1
37+
STARTUP_TIME ?= 2
3838

3939
# ------------------------------------------------------------------------------
4040
# Application container configuration

src/opt/scmi/environment.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ NO_CACHE="${NO_CACHE:-false}"
2828
DIST_PATH="${DIST_PATH:-./dist}"
2929

3030
# Number of seconds expected to complete container startup including bootstrap.
31-
STARTUP_TIME="${STARTUP_TIME:-1}"
31+
STARTUP_TIME="${STARTUP_TIME:-2}"
3232

3333
# Docker --sysctl settings
3434
SYSCTL_NET_CORE_SOMAXCONN="${SYSCTL_NET_CORE_SOMAXCONN:-1024}"

src/opt/scmi/service-unit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ readonly SERVICE_UNIT_REGISTER_ENVIRONMENT_KEYS="
2727
# -----------------------------------------------------------------------------
2828
# Variables
2929
# -----------------------------------------------------------------------------
30-
SERVICE_UNIT_INSTALL_TIMEOUT=${SERVICE_UNIT_INSTALL_TIMEOUT:-4}
30+
SERVICE_UNIT_INSTALL_TIMEOUT=${SERVICE_UNIT_INSTALL_TIMEOUT:-5}

test/shpec/operation_shpec.sh

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
readonly STARTUP_TIME=1
1+
readonly STARTUP_TIME=2
22
readonly TEST_DIRECTORY="test"
33

44
# These should ideally be a static value but hosts might be using this port so
@@ -546,16 +546,16 @@ function test_custom_configuration ()
546546
docker run \
547547
--detach \
548548
--name redis.pool-1.1.1 \
549-
--env MEMCACHED_AUTOSTART_MEMCACHED_WRAPPER=false \
549+
--env REDIS_AUTOSTART_REDIS_WRAPPER=false \
550550
jdeathe/centos-ssh-redis:latest \
551551
&> /dev/null
552552

553553
sleep ${STARTUP_TIME}
554554

555-
it "Can disable redis-wrapper."
555+
it "Can disable redis-server-wrapper."
556556
docker ps \
557-
--format "name=redis.pool-1.1.1" \
558-
--format "health=healthy" \
557+
--filter "name=redis.pool-1.1.1" \
558+
--filter "health=healthy" \
559559
&> /dev/null \
560560
&& docker top \
561561
redis.pool-1.1.1 \
@@ -569,6 +569,34 @@ function test_custom_configuration ()
569569
__terminate_container \
570570
redis.pool-1.1.1 \
571571
&> /dev/null
572+
573+
docker run \
574+
--detach \
575+
--name redis.pool-1.1.1 \
576+
--env REDIS_AUTOSTART_REDIS_BOOTSTRAP=false \
577+
jdeathe/centos-ssh-redis:latest \
578+
&> /dev/null
579+
580+
sleep ${STARTUP_TIME}
581+
582+
it "Can disable redis-server-bootstrap."
583+
docker ps \
584+
--filter "name=redis.pool-1.1.1" \
585+
--filter "health=healthy" \
586+
&> /dev/null \
587+
&& docker exec \
588+
redis.pool-1.1.1 \
589+
grep -q '^bind 0.0.0.0$' \
590+
/etc/redis.conf
591+
592+
assert equal \
593+
"${?}" \
594+
"0"
595+
end
596+
597+
__terminate_container \
598+
redis.pool-1.1.1 \
599+
&> /dev/null
572600
end
573601

574602
trap - \

0 commit comments

Comments
 (0)