Skip to content

Commit 33516e2

Browse files
Yanniccopybara-github
authored andcommitted
[remote] Improve .netrc test in RemoteModuleTest
The return value being non-null doesn't assert that we actually parsed the (expected) `.netrc`. Closes bazelbuild#15902. PiperOrigin-RevId: 461583660 Change-Id: I0cd9a56c79a2177d89f67e2c541f38eb0ca24dcb
1 parent 8a19544 commit 33516e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/com/google/devtools/build/lib/remote/RemoteModuleTest.java

+2
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@ public void testNetrc_netrcWithoutRemoteCache() throws Exception {
566566
clientEnv, fileSystem, reporter, authAndTLSOptions, remoteOptions);
567567

568568
assertThat(credentials).isNotNull();
569+
assertThat(credentials.getRequestMetadata(URI.create("https://foo.example.org"))).isNotEmpty();
570+
assertThat(credentials.getRequestMetadata(URI.create("https://bar.example.org"))).isEmpty();
569571
}
570572

571573
private static void assertRequestMetadata(

0 commit comments

Comments
 (0)