SkipCodeOwnerConfigValidationPushOptionIT: Fix a test
codeOwnersSkipOptionIsOmittedIfUserCannotSkipTheCodeOwnersValidation()
should test that the skip option is omitted if the user cannot skip the
code owners validation, but the test created a change for a disabled
branch so that the skip option would have been omitted also if the user
had the necessary permission.
Bug: Google b/279897514
Change-Id: I476433b9a96873ac15321a2ee80645bd72bf9814
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/SkipCodeOwnerConfigValidationPushOptionIT.java b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/SkipCodeOwnerConfigValidationPushOptionIT.java
index 3abee10..6c74375 100644
--- a/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/SkipCodeOwnerConfigValidationPushOptionIT.java
+++ b/javatests/com/google/gerrit/plugins/codeowners/acceptance/api/SkipCodeOwnerConfigValidationPushOptionIT.java
@@ -79,7 +79,6 @@
SkipCodeOwnerConfigValidationPushOption.DESCRIPTION)));
}
- @GerritConfig(name = "plugin.code-owners.disabledBranch", value = "refs/heads/master")
@Test
public void codeOwnersSkipOptionIsOmittedIfUserCannotSkipTheCodeOwnersValidation()
throws Exception {
@@ -87,7 +86,7 @@
// capability.
requestScopeOperations.setApiUser(user.id());
- Change.Id changeId = changeOperations.newChange().project(project).branch("master").create();
+ Change.Id changeId = changeOperations.newChange().project(project).create();
ValidationOptionInfos validationOptionsInfos =
gApi.changes().id(project.get(), changeId.get()).getValidationOptions();
assertThat(validationOptionsInfos.validationOptions).isEmpty();