Skip to content

Commit

Permalink
[remote] Improve .netrc test in RemoteModuleTest
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Yannic authored and aranguyen committed Jul 20, 2022
1 parent 824c633 commit 1a2b5f9
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1a2b5f9

Please sign in to comment.