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

unit tests require google application credentials #430

Closed
waltaskew opened this issue Mar 18, 2022 · 0 comments · Fixed by #431
Closed

unit tests require google application credentials #430

waltaskew opened this issue Mar 18, 2022 · 0 comments · Fixed by #431
Assignees
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. type: process A process-related concern. May include testing, release, or the like.

Comments

@waltaskew
Copy link
Contributor

The tests in tests/unit/test_select and test__struct require application credentials to run. Without credentials, running the suite results in errors like:

raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see [https://cloud.google.com/docs/authenticati\](https://cloud.google.com/docs/authenticati%5C)
on/getting-started

The credential requirement prevents them from being pure unit tests and running in any environment.

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Mar 18, 2022
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Mar 19, 2022
@tswast tswast added type: process A process-related concern. May include testing, release, or the like. and removed triage me I really want to be triaged. labels Mar 21, 2022
@tswast tswast self-assigned this Mar 21, 2022
gcf-merge-on-green bot pushed a commit that referenced this issue Mar 21, 2022
Remove the engine fixture from unit tests and use faux_conn instead. Creating
an engine requires credentials, which prevents these tests from being pure unit
tests and running in any environment.

Fixes #430 🦕
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants