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

Commit 5ccdd83

Browse files
authored
Merge pull request #261 from jdeathe/issue/248
CLOSES #248: Replaces memcached with redis session store.
2 parents a9f5b9c + 00cff41 commit 5ccdd83

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Summary of release changes.
1616
- Updates healthcheck failure messages to remove EOL character that is rendered in status response.
1717
- Updates wrapper script; only emit "waiting on" info message if bootstrap hasn't completed.
1818
- Updates ordering of Tags and respective Dockerfile links in README.md for readability.
19+
- Updates session test cases; replace PHP memcached session store with redis.
1920
- Adds improved test workflow; added `test-setup` target to Makefile.
2021
- Adds Makefile target `logsdef` to handle deferred logs output within a target chain.
2122
- Adds `/docs` directory for supplementary documentation and simplify README.

test/shpec/operation_shpec.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ DOCKER_PORT_MAP_TCP_8443="${DOCKER_PORT_MAP_TCP_8443:-NULL}"
1010

1111
function __destroy ()
1212
{
13-
local -r session_store_name="memcached.1"
13+
local -r session_store_name="redis.1"
1414
local -r session_store_network="bridge_internal_1"
1515

1616
# Destroy the session store container
@@ -85,10 +85,10 @@ function __is_container_ready ()
8585

8686
function __setup ()
8787
{
88-
local -r session_store_alias="memcached_1"
89-
local -r session_store_name="memcached.1"
88+
local -r session_store_alias="redis_1"
89+
local -r session_store_name="redis.1"
9090
local -r session_store_network="bridge_internal_1"
91-
local -r session_store_release="2.3.0"
91+
local -r session_store_release="3.1.1"
9292

9393
if [[ -z $(docker network ls -q -f name="${session_store_network}") ]]; then
9494
docker network create \
@@ -107,7 +107,7 @@ function __setup ()
107107
--name ${session_store_name} \
108108
--network ${session_store_network} \
109109
--network-alias ${session_store_alias} \
110-
jdeathe/centos-ssh-memcached:${session_store_release} \
110+
jdeathe/centos-ssh-redis:${session_store_release} \
111111
&> /dev/null
112112

113113
# Generate a self-signed certificate
@@ -681,7 +681,7 @@ ${other_required_apache_modules}
681681

682682
function test_custom_configuration ()
683683
{
684-
local -r session_store_alias="memcached_1"
684+
local -r session_store_alias="redis_1"
685685
local -r session_store_network="bridge_internal_1"
686686

687687
local apache_access_log_entry=""
@@ -2262,7 +2262,7 @@ function test_custom_configuration ()
22622262
&> /dev/null
22632263
end
22642264

2265-
describe "PHP memcached session store"
2265+
describe "PHP redis session store"
22662266
__terminate_container \
22672267
apache-php.1 \
22682268
&> /dev/null
@@ -2271,8 +2271,8 @@ function test_custom_configuration ()
22712271
--detach \
22722272
--name apache-php.1 \
22732273
--publish ${DOCKER_PORT_MAP_TCP_80}:80 \
2274-
--env PHP_OPTIONS_SESSION_SAVE_HANDLER="memcached" \
2275-
--env PHP_OPTIONS_SESSION_SAVE_PATH="${session_store_alias}:11211" \
2274+
--env PHP_OPTIONS_SESSION_SAVE_HANDLER="redis" \
2275+
--env PHP_OPTIONS_SESSION_SAVE_PATH="${session_store_alias}:6379" \
22762276
jdeathe/centos-ssh-apache-php-fcgi:latest \
22772277
&> /dev/null
22782278

@@ -2304,7 +2304,7 @@ function test_custom_configuration ()
23042304
session_start();
23052305
\$_SESSION['integer'] = 123;
23062306
\$_SESSION['float'] = 12345.67890;
2307-
\$_SESSION['string'] = '@memcached:#\$£';
2307+
\$_SESSION['string'] = '@ABCabc:#\$£';
23082308
session_write_close();
23092309
var_dump(\$_SESSION);
23102310
EOT
@@ -2404,7 +2404,7 @@ function test_custom_configuration ()
24042404
["float"]=>
24052405
float(12345.6789)
24062406
["string"]=>
2407-
string(15) "@memcached:#$£"
2407+
string(12) "@ABCabc:#$£"
24082408
}'
24092409
end
24102410
end

0 commit comments

Comments
 (0)