commit | 0fc059fd3b27bbe12d2f678d6ef4f88e3b37cb67 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Thu Apr 15 15:44:47 2021 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Fri Apr 16 16:15:30 2021 +0200 |
tree | 5e45d468daec0faa3edca30e0d42e4b5b080eed4 | |
parent | 3f57e87424ade0fcb26220690c144dedb44d34ed [diff] |
Test that getting code owners works for anonymous user Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I6641565b42ad8ceaf7742f8d5891048706ddb1fa
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 1a659ae..b2d421d 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/AbstractGetCodeOwnersForPathIT.java +++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/AbstractGetCodeOwnersForPathIT.java
@@ -114,12 +114,18 @@ @Test public void getCodeOwnersForAbsolutePath() throws Exception { - testGetCodeOwners(true); + testGetCodeOwners(/* useAbsolutePath= */ true); } @Test public void getCodeOwnersForNonAbsolutePath() throws Exception { - testGetCodeOwners(false); + testGetCodeOwners(/* useAbsolutePath= */ false); + } + + @Test + public void getCodeOwnersForAnonymousUser() throws Exception { + requestScopeOperations.setApiUserAnonymous(); + testGetCodeOwners(/* useAbsolutePath= */ true); } private void testGetCodeOwners(boolean useAbsolutePath) throws Exception {