1
0
mirror of https://github.com/fluencelabs/redis synced 2025-07-14 16:21:33 +00:00
Files
deps
src
tests
assets
helpers
integration
sentinel-tests
sentinel-tmp
support
tmp
unit
type
aofrw.tcl
auth.tcl
basic.tcl
bitops.tcl
dump.tcl
expire.tcl
introspection.tcl
limits.tcl
maxmemory.tcl
memefficiency.tcl
multi.tcl
obuf-limits.tcl
other.tcl
printver.tcl
protocol.tcl
pubsub.tcl
quit.tcl
scan.tcl
scripting.tcl
slowlog.tcl
sort.tcl
sentinel.tcl
test_helper.tcl
utils
.gitignore
00-RELEASENOTES
BUGS
CONTRIBUTING
COPYING
INSTALL
MANIFESTO
Makefile
README
redis.conf
runtest
runtest-sentinel
sentinel.conf
redis/tests/unit/auth.tcl

28 lines
748 B
Tcl
Raw Normal View History

start_server {tags {"auth"}} {
test {AUTH fails if there is no password configured server side} {
catch {r auth foo} err
set _ $err
} {ERR*no password*}
}
2010-06-02 23:14:55 +02:00
start_server {tags {"auth"} overrides {requirepass foobar}} {
test {AUTH fails when a wrong password is given} {
catch {r auth wrong!} err
set _ $err
} {ERR*invalid password}
test {Arbitrary command gives an error when AUTH is required} {
catch {r set foo bar} err
set _ $err
} {NOAUTH*}
test {AUTH succeeds when the right password is given} {
r auth foobar
} {OK}
test {Once AUTH succeeded we can actually send commands to the server} {
r set foo 100
r incr foo
} {101}
}