Closed John-Connolly closed 6 years ago
These surfaces are not tested, and Auth is particularly hard to test because of the way you configure Redis to use Auth.
I am opposed to untested surfaces being merged in as a rule, but "that is just my opinion man". I support the concept of this PR but oppose its state in the form of testing. I perhaps should have in retrospect added a throw RedisError to auth on failure so it is more clear what happens on failure. To me, it is not immediately obvious what happens if Auth fails. Could we elucidate what happens on failure if not with a test then with comments?
Well before the error was being ignored if auth was unsuccessful at least now if auth is not successful there is a way of knowing before sending more commands to redis.
I not sure my change is entirely correct, I don't use the RedisDatabase or the built in RedisProvider so I don't know when the best time to catch this error would be.
my real question is what error is being trown on failure? this is one thing that could definately be tested
The error would be whatever redis returns when auth is unsuccessful
oh yeh no doubt but what class of error would get thrown? RedisError, VaporError I am just confused on that part
Well, currently its the redis error that gets thrown. I don't know where it bubbles up to. I am going to close this because its probably not the right solution.
The result of the auth command probably should not be ignored.