mapleFU commented on PR #881:
URL:
https://github.com/apache/incubator-kvrocks/pull/881#issuecomment-1250108689
Hi, I'm trying to adding unit tests for `hello`, but here I come cross a
problem:
```
ADD_CMD("hello", -1, "read-only ok-loading", 0, 0, 0, CommandHello),
```
After adding the `ADD_CMD` above, the `auth` test would failed:
```
=== RUN TestAuth
--- FAIL: TestAuth (2.01s)
=== RUN TestAuth/AUTH_fails_when_a_wrong_password_is_given
auth_test.go:56:
Error Trace:
/Users/fuxuwei/workspace/CMakeLibs/incubator-kvrocks/tests/gocase/unit/auth/auth_test.go:56
Error: Error "NOAUTH Authentication required." does
not contain "invalid password"
Test:
TestAuth/AUTH_fails_when_a_wrong_password_is_given
--- FAIL: TestAuth/AUTH_fails_when_a_wrong_password_is_given (0.00s)
=== RUN TestAuth/Arbitrary_command_gives_an_error_when_AUTH_is_required
--- PASS:
TestAuth/Arbitrary_command_gives_an_error_when_AUTH_is_required (0.00s)
=== RUN TestAuth/AUTH_succeeds_when_the_right_password_is_given
auth_test.go:66:
Error Trace:
/Users/fuxuwei/workspace/CMakeLibs/incubator-kvrocks/tests/gocase/unit/auth/auth_test.go:66
Error: Not equal:
expected: string("OK")
actual : <nil>(<nil>)
Test:
TestAuth/AUTH_succeeds_when_the_right_password_is_given
--- FAIL: TestAuth/AUTH_succeeds_when_the_right_password_is_given (0.00s)
Expected :string("OK")
Actual :<nil>(<nil>)
<Click to see difference>
```
Even leaving an empty implements in `CommandHello`, or not changing the
logic of `CommandAuth`, the test would failed. I think maybe I miss some
details in `redis_cmd`, do you have any ideas? @git-hulk
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]