Skip to content
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

pgwire: convert a few more auth tests to datadriven input #43725

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

knz
Copy link
Contributor

@knz knz commented Jan 4, 2020

TestPGWire, RootUserAuth and TestUserAuth had been converted already.
This completes by converting UnicodeUserAuth and also using that to
exercise username normalization.

The patch also converts TestPGWireNonexistentUser in insecure mode (a
test already existed for secure mode).

It also makes connect tests print out the name of the current db
after login, and uses that to replace TestPGWireDBName.

Release note: None

@knz knz requested a review from maddyblue January 4, 2020 13:11
@cockroach-teamcity
Copy link
Member

This change is Reviewable


# Verify auth fails without password.
#
# Also verify that the username gets normalized: the username
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need to test here that the non-normalized username (i.e., the one provide initially) also works?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Done.

TestPGWire, RootUserAuth and TestUserAuth had been converted already.
This completes by converting UnicodeUserAuth and also using that to
exercise username normalization.

The patch also converts TestPGWireNonexistentUser in insecure mode (a
test already existed for secure mode).

It also makes `connect` tests print out the name of the current db
after login, and uses that to replace TestPGWireDBName.

Release note: None
@knz
Copy link
Contributor Author

knz commented Jan 6, 2020

TFYR!

bors r+

@knz knz force-pushed the 2020014-simplify-test branch from aeca380 to 14def93 Compare January 6, 2020 04:16
craig bot pushed a commit that referenced this pull request Jan 6, 2020
43725: pgwire: convert a few more auth tests to datadriven input r=knz a=knz

TestPGWire, RootUserAuth and TestUserAuth had been converted already.
This completes by converting UnicodeUserAuth and also using that to
exercise username normalization.

The patch also converts TestPGWireNonexistentUser in insecure mode (a
test already existed for secure mode).

It also makes `connect` tests print out the name of the current db
after login, and uses that to replace TestPGWireDBName.

Release note: None

Co-authored-by: Raphael 'kena' Poss <[email protected]>
@craig
Copy link
Contributor

craig bot commented Jan 6, 2020

Build succeeded

@craig craig bot merged commit 14def93 into cockroachdb:master Jan 6, 2020
@knz
Copy link
Contributor Author

knz commented Jan 9, 2020

(simplifies fixing #31113)

@knz knz deleted the 2020014-simplify-test branch January 9, 2020 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants