From 33516e27dc6ee6ab5c3b9dee739a267b08d26b6c Mon Sep 17 00:00:00 2001 From: Yannic Date: Mon, 18 Jul 2022 04:21:10 -0700 Subject: [PATCH] [remote] Improve .netrc test in RemoteModuleTest The return value being non-null doesn't assert that we actually parsed the (expected) `.netrc`. Closes #15902. PiperOrigin-RevId: 461583660 Change-Id: I0cd9a56c79a2177d89f67e2c541f38eb0ca24dcb --- .../com/google/devtools/build/lib/remote/RemoteModuleTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/com/google/devtools/build/lib/remote/RemoteModuleTest.java b/src/test/java/com/google/devtools/build/lib/remote/RemoteModuleTest.java index 032f17668d923c..bfc0171b6b84f6 100644 --- a/src/test/java/com/google/devtools/build/lib/remote/RemoteModuleTest.java +++ b/src/test/java/com/google/devtools/build/lib/remote/RemoteModuleTest.java @@ -566,6 +566,8 @@ public void testNetrc_netrcWithoutRemoteCache() throws Exception { clientEnv, fileSystem, reporter, authAndTLSOptions, remoteOptions); assertThat(credentials).isNotNull(); + assertThat(credentials.getRequestMetadata(URI.create("https://foo.example.org"))).isNotEmpty(); + assertThat(credentials.getRequestMetadata(URI.create("https://bar.example.org"))).isEmpty(); } private static void assertRequestMetadata(