-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
auth: unit-test for authStore.AuthDisable() #7257
Conversation
auth/store_test.go
Outdated
t.Errorf("expected %v, got %v", ErrAuthNotEnabled, err) | ||
} | ||
|
||
// Disabling disabled auth again and trying to Authenticate |
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.
add a comment about why we want to try disabling auth again?
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.
Disabling disabled auth to make sure it can return safely if store is already disabled.
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.
@Rushit Yea. Probably add the comment into the code as a comment? I know why we need to test it. But it just reads strange without an explanation.
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.
@Rushit Great! thank you!
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.
done.
LGTM. Defer to @mitake |
This will cover unit-test for AuthDisable in store.go
ignore it for now. |
This will cover unit-test for AuthDisable in store.go
/cc @mitake @xiang90