Browse Source

Add new "redis-basics-persistent" test to verify persistence

Tianon Gravi 9 năm trước cách đây
mục cha
commit
4136b5ed0b

+ 1 - 0
test/config.sh

@@ -138,6 +138,7 @@ imageTests+=(
 	'
 	[redis]='
 		redis-basics
+		redis-basics-persistent
 	'
 	[rethinkdb]='
 	'

+ 1 - 0
test/tests/redis-basics-persistent/real-run.sh

@@ -0,0 +1 @@
+../redis-basics/run.sh

+ 14 - 0
test/tests/redis-basics-persistent/run.sh

@@ -0,0 +1,14 @@
+#!/bin/bash
+set -eo pipefail
+
+dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
+
+image="$1"
+
+newImage="$("$dir/../image-name.sh" librarytest/redis-basics-persistent "$image")"
+"$dir/../docker-build.sh" "$dir" "$newImage" <<EOD
+FROM $image
+CMD ["--appendonly", "yes"]
+EOD
+
+exec "$dir/real-run.sh" "$newImage"