Fix getAllUsersAsCodeOwners_allVisible test This test was supposed to test the code for handling accounts.visibility = ALL, but since the admin user was doing the call we instead landed in the shortcut for users that have the VIEW_ALL_ACCOUNTS capability (which is already covered by getAllUsersAsCodeOwners_withViewAllAccounts). This was discovered by looking at the test coverage. Fixing this increases the test coverage for AbstractGetCodeOwnersForPath slightly from 95.4% to 96.2%. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I1ef01100677586daf10581c3876a639bb313b009
diff --git a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/AbstractGetCodeOwnersForPathIT.java b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/AbstractGetCodeOwnersForPathIT.java index 4dbac76..c811514 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/AbstractGetCodeOwnersForPathIT.java +++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/AbstractGetCodeOwnersForPathIT.java
@@ -861,6 +861,7 @@ .containsExactly(user.id(), user2.id(), admin.id()); // Query code owners with a limit. + requestScopeOperations.setApiUser(user.id()); codeOwnerInfos = queryCodeOwners(getCodeOwnersApi().query().withLimit(2), "/foo/bar/baz.md"); assertThat(codeOwnerInfos).hasSize(2); assertThatList(codeOwnerInfos)