diff options
author | 2017-12-20 10:13:23 -0800 | |
---|---|---|
committer | 2017-12-20 10:41:39 -0800 | |
commit | 8a7c63e76320b1ae8eafc1a44d82d1214e1bfdb0 (patch) | |
tree | c29389efa25f8ce028f60596388e4fcbe91aa7ed /src/test | |
parent | a982168020216055b1cc7a2825d459f76208a733 (diff) |
remote: rename auth flags.
--auth_* flags only work with Google Cloud Authentication. That's
confusing and restricts the naming of more general purpose authentication
flags that we might want to add in the future. So instead of --auth_*
let's call them --google_* (the old ones will continue working for a
while).
Also, --auth_enabled (aka --google_default_credentials) is no longer required
when specifying --auth_credentials (aka --google_credentials).
So now there's two simple ways to authenticate with Google Cloud:
* bazel build --google_default_credentials
* bazel build --google_credentials=creds.json
RELNOTES: --auth_* flags were renamed to --google_* flags. The old names
will continue to work for this release but will be removed in the next
release.
Change-Id: Ia1736f32e15a37995be3172cd9608d518ddeab44
PiperOrigin-RevId: 179700832
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java index 83d4efdfd0..0b220aa3d1 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteCacheTest.java @@ -141,9 +141,9 @@ public class GrpcRemoteCacheTest { private GrpcRemoteCache newClient() throws IOException { AuthAndTLSOptions authTlsOptions = Options.getDefaults(AuthAndTLSOptions.class); - authTlsOptions.authEnabled = true; - authTlsOptions.authCredentials = "/exec/root/creds.json"; - authTlsOptions.authScope = ImmutableList.of("dummy.scope"); + authTlsOptions.useGoogleDefaultCredentials = true; + authTlsOptions.googleCredentials = "/exec/root/creds.json"; + authTlsOptions.googleAuthScopes = ImmutableList.of("dummy.scope"); GenericJson json = new GenericJson(); json.put("type", "authorized_user"); @@ -151,12 +151,12 @@ public class GrpcRemoteCacheTest { json.put("client_secret", "foo"); json.put("refresh_token", "bar"); Scratch scratch = new Scratch(); - scratch.file(authTlsOptions.authCredentials, new JacksonFactory().toString(json)); + scratch.file(authTlsOptions.googleCredentials, new JacksonFactory().toString(json)); CallCredentials creds = GoogleAuthUtils.newCallCredentials( - scratch.resolve(authTlsOptions.authCredentials).getInputStream(), - authTlsOptions.authScope); + scratch.resolve(authTlsOptions.googleCredentials).getInputStream(), + authTlsOptions.googleAuthScopes); RemoteOptions remoteOptions = Options.getDefaults(RemoteOptions.class); RemoteRetrier retrier = new RemoteRetrier( |