diff options
author | 2017-07-14 14:58:07 +0200 | |
---|---|---|
committer | 2017-07-14 16:34:49 +0200 | |
commit | bcbd2da340ed24a026729104dc0ba2a71cf70463 (patch) | |
tree | e35a267f88cdb383bf06406a2889a0c06f4fa9c9 /src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java | |
parent | 21fc8eb2c15e5b83b591084c68887827222b6e73 (diff) |
remote: Improve error handling for --remote_* cmd line flags. Fixes #3361, #3358
- Move flag handling into RemoteModule to fail as early as possible.
- Make error messages from flag handling human readable.
- Fix a bug where remote execution would only support TLS with a root
certificate being specified.
- If a remote executor without a remote cache is specified, assume the
remote cache to be the same as the executor.
PiperOrigin-RevId: 161946029
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java index 2a39ba9bc1..a773d4d1a1 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java @@ -31,6 +31,7 @@ import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.Artifact.ArtifactExpander; import com.google.devtools.build.lib.actions.ResourceSet; import com.google.devtools.build.lib.actions.SimpleSpawn; +import com.google.devtools.build.lib.authandtls.AuthAndTLSOptions; import com.google.devtools.build.lib.exec.SpawnInputExpander; import com.google.devtools.build.lib.exec.SpawnResult; import com.google.devtools.build.lib.exec.SpawnRunner.ProgressStatus; @@ -202,8 +203,10 @@ public class GrpcRemoteExecutionClientTest { Channel channel = InProcessChannelBuilder.forName(fakeServerName).directExecutor().build(); GrpcRemoteExecutor executor = new GrpcRemoteExecutor(channel, null, options.remoteTimeout, retrier); + ChannelOptions defaultOpts = + ChannelOptions.create(Options.getDefaults(AuthAndTLSOptions.class)); GrpcRemoteCache remoteCache = - new GrpcRemoteCache(channel, ChannelOptions.DEFAULT, options, retrier); + new GrpcRemoteCache(channel, defaultOpts, options, retrier); client = new RemoteSpawnRunner(execRoot, options, null, remoteCache, executor); inputDigest = fakeFileCache.createScratchInput(simpleSpawn.getInputFiles().get(0), "xyz"); } |