commit | 26e3abb857ec1837767bc5a70867f54f71f32799 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Mon Apr 19 16:23:52 2021 +0200 |
committer | Edwin Kempin <ekempin@google.com> | Mon Apr 19 16:24:30 2021 +0200 |
tree | 10175ddbcbad3e1a312899e0484203975c1c0aa1 | |
parent | 463468ce0198fee35b4502a25bd166a976836399 [diff] |
Test that invalid hex account option is correctly handled Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Ic3222d67f9b1bb8becaa068627e9423172ee8fc9
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 cadf021..7aa024d 100644 --- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/restapi/AbstractGetCodeOwnersForPathRestIT.java +++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/restapi/AbstractGetCodeOwnersForPathRestIT.java
@@ -163,6 +163,15 @@ } @Test + public void cannotGetCodeOwnersWithInvalidHexAccountOption() throws Exception { + String invalidHexOption = "INVALID"; + RestResponse r = adminRestSession.get(getUrl(TEST_PATH, "O=" + invalidHexOption)); + r.assertBadRequest(); + assertThat(r.getEntityContent()) + .isEqualTo(String.format("\"%s\" is not a valid value for \"-O\"", invalidHexOption)); + } + + @Test @GerritConfig(name = "plugin.code-owners.backend", value = "non-existing-backend") public void cannotGetCodeOwnersIfPluginConfigurationIsInvalid() throws Exception { RestResponse r = adminRestSession.get(getUrl(TEST_PATH));