commit | 8d5f4315d8c535d68f3ae8bd9472312562293c30 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Mon Dec 21 14:53:01 2020 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Thu Jan 07 08:40:33 2021 +0100 |
tree | c46515a4e87974c3e064f783620ada2943ed1856 | |
parent | c15aaaa796b3abdc3e937901ac14b6073b5a25c7 [diff] |
Test getting code owners with invalid limit Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I8e1ad1ba8c58c1a0e432d710094c2c033c72b904
diff --git a/javatests/com/google/gerrit/plugins/codeowners/acceptance/restapi/AbstractGetCodeOwnersForPathRestIT.java b/javatests/com/google/gerrit/plugins/codeowners/acceptance/restapi/AbstractGetCodeOwnersForPathRestIT.java index fe0023c..af2997e 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/restapi/AbstractGetCodeOwnersForPathRestIT.java +++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/restapi/AbstractGetCodeOwnersForPathRestIT.java
@@ -165,4 +165,11 @@ + " 'non-existing-backend' that is configured in gerrit.config (parameter" + " plugin.code-owners.backend) not found."); } + + @Test + public void cannotGetCodeOwnersWithInvalidLimit() throws Exception { + RestResponse r = adminRestSession.get(getUrl(TEST_PATH, "limit=invalid")); + r.assertBadRequest(); + assertThat(r.getEntityContent()).contains("\"invalid\" is not a valid value for \"--limit\""); + } }