diff options
author | antirez <antirez@gmail.com> | 2020-03-23 12:00:46 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-03-23 12:02:12 +0100 |
commit | 61de1c11466030908c22ed18206ae9dba189ef8b (patch) | |
tree | 8de5395db37b33b216d37e6ac8974deb6ee72de4 | |
parent | 918086e253407f7f327c564bd650ac065053af0e (diff) | |
download | redis-61de1c11466030908c22ed18206ae9dba189ef8b.tar.gz |
Fix BITFIELD_RO test.
-rw-r--r-- | src/bitops.c | 2 | ||||
-rw-r--r-- | tests/unit/bitfield.tcl | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/bitops.c b/src/bitops.c index d4e82c937..f78e4fd34 100644 --- a/src/bitops.c +++ b/src/bitops.c @@ -1007,7 +1007,7 @@ void bitfieldGeneric(client *c, int flags) { } else { if (flags & BITFIELD_FLAG_READONLY) { zfree(ops); - addReplyError(c, "BITFIELD_RO only support the GET subcommand"); + addReplyError(c, "BITFIELD_RO only supports the GET subcommand"); return; } diff --git a/tests/unit/bitfield.tcl b/tests/unit/bitfield.tcl index 819d8f36d..1f2f6395e 100644 --- a/tests/unit/bitfield.tcl +++ b/tests/unit/bitfield.tcl @@ -207,7 +207,7 @@ start_server {tags {"repl"}} { set master_port [srv -1 port] set slave [srv 0 client] - test {setup slave} { + test {BITFIELD: setup slave} { $slave slaveof $master_host $master_port wait_for_condition 50 100 { [s 0 master_link_status] eq {up} @@ -216,7 +216,7 @@ start_server {tags {"repl"}} { } } - test {write on master, read on slave} { + test {BITFIELD: write on master, read on slave} { $master del bits assert_equal 0 [$master bitfield bits set u8 0 255] assert_equal 255 [$master bitfield bits set u8 0 100] @@ -224,9 +224,9 @@ start_server {tags {"repl"}} { assert_equal 100 [$slave bitfield_ro bits get u8 0] } - test {bitfield_ro with write option} { + test {BITFIELD_RO fails when write option is used} { catch {$slave bitfield_ro bits set u8 0 100 get u8 0} err - assert_match {*ERR bitfield_ro only support get subcommand*} $err + assert_match {*ERR BITFIELD_RO only supports the GET subcommand*} $err } } } |