summaryrefslogtreecommitdiffstats
path: root/tests/cli_tests
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-20 09:20:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-20 09:20:47 +0000
commitec80aa0259c0c014bbbe496bd19a570be6fc6fae (patch)
tree7d516a3b07dd7a8e27bc492e47c26aaa30c3c159 /tests/cli_tests
parentAdding upstream version 1.13.1. (diff)
downloadiredis-upstream/1.13.2.tar.xz
iredis-upstream/1.13.2.zip
Adding upstream version 1.13.2.upstream/1.13.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/cli_tests')
-rw-r--r--tests/cli_tests/test_command_restore.py6
-rw-r--r--tests/cli_tests/test_pager.py7
2 files changed, 12 insertions, 1 deletions
diff --git a/tests/cli_tests/test_command_restore.py b/tests/cli_tests/test_command_restore.py
new file mode 100644
index 0000000..1c34405
--- /dev/null
+++ b/tests/cli_tests/test_command_restore.py
@@ -0,0 +1,6 @@
+def test_restore_command(clean_redis, cli):
+ cli.sendline(r'restore foo1 0 "\x00\x03bar\t\x006L\x18\xac\xba\xe0\x9e\xa6"')
+ cli.expect(["OK", "127.0.0.1"])
+
+ cli.sendline("get foo1")
+ cli.expect('"bar"')
diff --git a/tests/cli_tests/test_pager.py b/tests/cli_tests/test_pager.py
index 38ced31..5a285a8 100644
--- a/tests/cli_tests/test_pager.py
+++ b/tests/cli_tests/test_pager.py
@@ -54,13 +54,18 @@ def test_using_pager_works_for_help():
child.expect(TEST_PAGER_BOUNDARY)
+long_list_type = "quicklist"
+if os.environ["REDIS_VERSION"] == "7":
+ long_list_type = "listpack"
+
+
def test_pager_works_for_peek(clean_redis):
for index in range(100):
clean_redis.lpush("long-list", f"value-{index}")
with pager_enabled_cli() as child:
child.sendline("peek long-list")
child.expect(TEST_PAGER_BOUNDARY)
- child.expect("(quicklist)")
+ child.expect(f"({long_list_type})")
child.expect("value-1")
child.expect(TEST_PAGER_BOUNDARY)