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

Commit aef8c67

Browse files
authored
Merge pull request #260 from jdeathe/issue/249
CLOSES #249: Replaces memcached with redis session store.
2 parents 5a1b858 + d9e2586 commit aef8c67

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
@@ -13,6 +13,7 @@ Summary of release changes.
1313
- Updates healthcheck failure messages to remove EOL character that is rendered in status response.
1414
- Updates wrapper script; only emit "waiting on" info message if bootstrap hasn't completed.
1515
- Updates ordering of Tags and respective Dockerfile links in README.md for readability.
16+
- Updates session test cases; replace PHP memcached session store with redis.
1617
- Adds improved test workflow; added `test-setup` target to Makefile.
1718
- Adds Makefile target `logsdef` to handle deferred logs output within a target chain.
1819
- 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.pool-1.1.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.pool-1.1.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="1.3.1"
91+
local -r session_store_release="1.2.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
@@ -667,7 +667,7 @@ ${other_required_apache_modules}
667667

668668
function test_custom_configuration ()
669669
{
670-
local -r session_store_alias="memcached_1"
670+
local -r session_store_alias="redis_1"
671671
local -r session_store_network="bridge_internal_1"
672672

673673
local apache_access_log_entry=""
@@ -2247,7 +2247,7 @@ function test_custom_configuration ()
22472247
&> /dev/null
22482248
end
22492249

2250-
describe "PHP memcached session store"
2250+
describe "PHP redis session store"
22512251
__terminate_container \
22522252
apache-php.1 \
22532253
&> /dev/null
@@ -2256,8 +2256,8 @@ function test_custom_configuration ()
22562256
--detach \
22572257
--name apache-php.1 \
22582258
--publish ${DOCKER_PORT_MAP_TCP_80}:80 \
2259-
--env PHP_OPTIONS_SESSION_SAVE_HANDLER="memcached" \
2260-
--env PHP_OPTIONS_SESSION_SAVE_PATH="${session_store_alias}:11211" \
2259+
--env PHP_OPTIONS_SESSION_SAVE_HANDLER="redis" \
2260+
--env PHP_OPTIONS_SESSION_SAVE_PATH="${session_store_alias}:6379" \
22612261
jdeathe/centos-ssh-apache-php:latest \
22622262
&> /dev/null
22632263

@@ -2289,7 +2289,7 @@ function test_custom_configuration ()
22892289
session_start();
22902290
\$_SESSION['integer'] = 123;
22912291
\$_SESSION['float'] = 12345.67890;
2292-
\$_SESSION['string'] = '@memcached:#\$£';
2292+
\$_SESSION['string'] = '@ABCabc:#\$£';
22932293
session_write_close();
22942294
var_dump(\$_SESSION);
22952295
EOT
@@ -2389,7 +2389,7 @@ function test_custom_configuration ()
23892389
["float"]=>
23902390
float(12345.6789)
23912391
["string"]=>
2392-
string(15) "@memcached:#$£"
2392+
string(12) "@ABCabc:#$£"
23932393
}'
23942394
end
23952395
end

0 commit comments

Comments
 (0)