-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update handling of account authentication expired error #695
Conversation
After this merge, this test should be updated in the server: nats-io/nats-server@master...wallyqs:auth-acc-expired-err |
nats_test.go
Outdated
@@ -1651,6 +1651,107 @@ func TestRevokedUserCredentials(t *testing.T) { | |||
wg.Wait() | |||
} | |||
|
|||
func TestExpiredAccountAuthentication(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think some of these tests should be refactored into table driven tests since too similar, I'll update the PR
0dc0560
to
d0e4a07
Compare
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
d0e4a07
to
bd7b51f
Compare
@kozlovic there were three types of expired/revoked errors that had to be handled in the same way, I changed into table driven tests so that it is easier to add/remove these special cases /cc @matthiashanel {"expired users credentials", AUTHENTICATION_EXPIRED_ERR, ErrAuthExpired},
{"revoked users credentials", AUTHENTICATION_REVOKED_ERR, ErrAuthRevoked},
{"expired account", ACCOUNT_AUTHENTICATION_EXPIRED_ERR, ErrAccountAuthExpired}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (sorry I got confused with 684 and thought that you added the same auth error that was there, but it is different).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Applies similar handling
-ERR 'Account Authentication Expired
error as with others auth expired errors.Signed-off-by: Waldemar Quevedo wally@synadia.com