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.
The assert
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
and not worry about needing the env var to be set in the testing environment.