cachapa / firedart

A dart-native implementation of the Firebase Auth and Firestore SDKs
https://pub.dev/packages/firedart
Apache License 2.0
174 stars 62 forks source link

Consider removing assert in firestore_test.dart #143

Open nickmeinhold opened 4 months ago

nickmeinhold commented 4 months ago

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.