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

Consider removing assert in firestore_test.dart #143

Open
nickmeinhold opened this issue Jun 25, 2024 · 0 comments · May be fixed by #144
Open

Consider removing assert in firestore_test.dart #143

nickmeinhold opened this issue Jun 25, 2024 · 0 comments · May be fixed by #144

Comments

@nickmeinhold
Copy link

The assert

group('ApplicationDefaultAuthenticator', () {
 
 assert(Platform.environment.containsKey(
  'GOOGLE_APPLICATION_CREDENTIALS'),
  'GOOGLE_APPLICATION_CREDENTIALS environment variable must be set. '
  'See the docs: https://cloud.google.com/docs/authentication/application-default-credentials#GAC',
);

kind of goes against how ADC works, in that if a credential is in a well known location but GOOGLE_APPLICATION_CREDENTIALS is not set, the credential should still be found.

Also, removing the assert means we can just run

gcloud auth application-default login

and not worry about needing the env var to be set in the testing environment.

@nickmeinhold nickmeinhold linked a pull request Jun 25, 2024 that will close this issue
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 a pull request may close this issue.

1 participant