Skip to content

Commit c599e46

Browse files
committed
fix problematic doctest
from redis docs for ACL DELUSER: Delete all the specified ACL users and terminate all the connections that are authenticated with such users Nodejs complains: Warning: Detected unsettled top-level await which in turn gives the error code 13 in the workflow await client.auth({ username: 'test-user' ...}); // deleting the user that is currently logged in -> bad await client.sendCommand(['ACL', 'DELUSER', 'test-user']); await client.quit() fix: authenticate with the default user before deleting the test-user
1 parent 35adf04 commit c599e46

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

doctests/cmds-cnxmgmt.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ console.log(res3); // OK
3939

4040
// REMOVE_START
4141
assert.equal(res3, "OK");
42+
await client.auth({ username: 'default', password: '' })
4243
await client.sendCommand(['ACL', 'DELUSER', 'test-user']);
4344
// REMOVE_END
4445
// STEP_END

0 commit comments

Comments
 (0)