forked from jenkinsci/gerrit-trigger-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gerrit changes with the kind NO_CHANGE are not excluded from building with exclude trivial rebase or exclude no code change. This fixes that, since NO_CHANGE is even more trivial than those.
- Loading branch information
Showing
3 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,7 @@ public void shouldNotFireOnDraftPatchsetWhenExcluded() { | |
|
||
/** | ||
* Tests that it should not fire on trivial rebase when they are excluded. | ||
* Also tests that we don't fire for no change while ignoring trivial rebases. | ||
* @author Doug Kelly <[email protected]> | ||
*/ | ||
@Test | ||
|
@@ -68,10 +69,13 @@ public void shouldNotFireOnTrivialRebaseWhenExcluded() { | |
assertTrue(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated)); | ||
patchsetCreated.getPatchSet().setKind(GerritChangeKind.TRIVIAL_REBASE); | ||
assertFalse(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated)); | ||
patchsetCreated.getPatchSet().setKind(GerritChangeKind.NO_CHANGE); | ||
assertFalse(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated)); | ||
} | ||
|
||
/** | ||
* Tests that it should not fire on no code changes when they are excluded. | ||
* Also tests that we don't fire for no change while ignoring no code change. | ||
* @author Doug Kelly <[email protected]> | ||
*/ | ||
@Test | ||
|
@@ -86,6 +90,8 @@ public void shouldNotFireOnNoCodeChangeWhenExcluded() { | |
assertTrue(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated)); | ||
patchsetCreated.getPatchSet().setKind(GerritChangeKind.NO_CODE_CHANGE); | ||
assertFalse(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated)); | ||
patchsetCreated.getPatchSet().setKind(GerritChangeKind.NO_CHANGE); | ||
assertFalse(pluginPatchsetCreatedEvent.shouldTriggerOn(patchsetCreated)); | ||
} | ||
|
||
/** | ||
|