summaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests')
-rwxr-xr-xdebian/tests/0001-redis-cli12
-rwxr-xr-xdebian/tests/0002-benchmark11
-rwxr-xr-xdebian/tests/0003-redis-check-aof5
-rwxr-xr-xdebian/tests/0004-redis-check-rdb14
-rwxr-xr-xdebian/tests/0005-cjson11
-rw-r--r--debian/tests/control14
6 files changed, 67 insertions, 0 deletions
diff --git a/debian/tests/0001-redis-cli b/debian/tests/0001-redis-cli
new file mode 100755
index 0000000..1e4a051
--- /dev/null
+++ b/debian/tests/0001-redis-cli
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# Show the INFO from "redis-cli"
+
+set -eu
+
+service redis-server restart
+
+sleep 5
+
+redis-cli INFO
+redis-cli LOLWUT
diff --git a/debian/tests/0002-benchmark b/debian/tests/0002-benchmark
new file mode 100755
index 0000000..87b769b
--- /dev/null
+++ b/debian/tests/0002-benchmark
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Run the benchmarking
+
+set -eu
+
+service redis-server restart
+
+sleep 5
+
+redis-benchmark -P 10
diff --git a/debian/tests/0003-redis-check-aof b/debian/tests/0003-redis-check-aof
new file mode 100755
index 0000000..fab3330
--- /dev/null
+++ b/debian/tests/0003-redis-check-aof
@@ -0,0 +1,5 @@
+#!/bin/sh
+#
+# Smoke test redis-check-aof
+
+redis-check-aof 2>&1 | grep -qsi usage:
diff --git a/debian/tests/0004-redis-check-rdb b/debian/tests/0004-redis-check-rdb
new file mode 100755
index 0000000..73d5de1
--- /dev/null
+++ b/debian/tests/0004-redis-check-rdb
@@ -0,0 +1,14 @@
+#!/bin/sh
+#
+# Test redis-check-rdb
+
+set -eu
+
+service redis-server restart
+
+sleep 5
+
+# Perform a synchronous save to ensure .rdb file eixsts
+redis-cli SAVE
+
+redis-check-rdb /var/lib/redis/dump.rdb
diff --git a/debian/tests/0005-cjson b/debian/tests/0005-cjson
new file mode 100755
index 0000000..cc07c3c
--- /dev/null
+++ b/debian/tests/0005-cjson
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# Check we can load/use the cjson extension.
+
+set -eu
+
+service redis-server restart
+
+sleep 5
+
+redis-cli EVAL 'cjson.decode("{}")' 0
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..8161a2d
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,14 @@
+Tests: 0001-redis-cli
+Restrictions: needs-root
+
+Tests: 0002-benchmark
+Restrictions: needs-root
+
+Tests: 0003-redis-check-aof
+Restrictions: needs-root
+
+Tests: 0004-redis-check-rdb
+Restrictions: needs-root
+
+Tests: 0005-cjson
+Restrictions: needs-root