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

sql/pgwire: unit tests should check db name qualification #4612

Closed
knz opened this issue Feb 23, 2016 · 3 comments
Closed

sql/pgwire: unit tests should check db name qualification #4612

knz opened this issue Feb 23, 2016 · 3 comments
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Milestone

Comments

@knz
Copy link
Contributor

knz commented Feb 23, 2016

Found while investigating #4550.

Currently all Go acceptance tests connect without a db name (so no default db in session) and qualify the db name in all test queries.

There should be some tests in here that connect with a test database pre-populated in the session and then check that queries with unqualified table names succeed.

@tamird
Copy link
Contributor

tamird commented Feb 24, 2016

Does this need to be an acceptance test? Seems like a unit test would
suffice.
On Feb 23, 2016 18:38, "kena" notifications@github.com wrote:

Found while investigating #4550
#4550.

Currently all Go acceptance tests connect without a db name (so no default
db in session) and qualify the db name in all test queries.

There should be some tests in here that connect with a test database
pre-populated in the session and then check that queries with unqualified
table names succeed.


Reply to this email directly or view it on GitHub
#4612.

@knz knz changed the title sql/pgwire: acceptance tests should check db name qualification sql/pgwire: unit tests should check db name qualification Feb 24, 2016
@petermattis petermattis added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Feb 25, 2016
@petermattis petermattis added this to the Beta milestone Feb 25, 2016
@petermattis
Copy link
Collaborator

@dt Didn't you just fix this bug? Is the test coverage now sufficient?

@dt
Copy link
Member

dt commented Mar 1, 2016

TestPGWireDBName checks that an unqualified table name is qualified using the db name that was used when connecting, so yeah.

@dt dt closed this as completed Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

4 participants