@@ -140,7 +140,7 @@ public void testMergeAndPush() throws Exception {
140140
141141 project .getPublishersList ().add (new GitPublisher (
142142 Collections .<TagToPush >emptyList (),
143- Collections .singletonList (new BranchToPush ("origin" , "integration" , false )),
143+ Collections .singletonList (new BranchToPush ("origin" , "integration" )),
144144 Collections .<NoteToPush >emptyList (),
145145 true , true , false ));
146146
@@ -177,7 +177,7 @@ public void testMergeAndPushFF() throws Exception {
177177
178178 project .getPublishersList ().add (new GitPublisher (
179179 Collections .<TagToPush >emptyList (),
180- Collections .singletonList (new BranchToPush ("origin" , "integration" , false )),
180+ Collections .singletonList (new BranchToPush ("origin" , "integration" )),
181181 Collections .<NoteToPush >emptyList (),
182182 true , true , false ));
183183
@@ -262,7 +262,7 @@ public void testMergeAndPushNoFF() throws Exception {
262262
263263 project .getPublishersList ().add (new GitPublisher (
264264 Collections .<TagToPush >emptyList (),
265- Collections .singletonList (new BranchToPush ("origin" , "integration" , false )),
265+ Collections .singletonList (new BranchToPush ("origin" , "integration" )),
266266 Collections .<NoteToPush >emptyList (),
267267 true , true , false ));
268268
@@ -351,7 +351,7 @@ public void testMergeAndPushFFOnly() throws Exception {
351351
352352 project .getPublishersList ().add (new GitPublisher (
353353 Collections .<TagToPush >emptyList (),
354- Collections .singletonList (new BranchToPush ("origin" , "integration" , false )),
354+ Collections .singletonList (new BranchToPush ("origin" , "integration" )),
355355 Collections .<NoteToPush >emptyList (),
356356 true , true , false ));
357357
@@ -454,7 +454,7 @@ public void testPushEnvVarsInRemoteConfig() throws Exception{
454454
455455 project .getPublishersList ().add (new GitPublisher (
456456 Collections .singletonList (new TagToPush ("$TARGET_NAME" , tag_name , "" , false , false )),
457- Collections .singletonList (new BranchToPush ("$TARGET_NAME" , "$TARGET_BRANCH" , false )),
457+ Collections .singletonList (new BranchToPush ("$TARGET_NAME" , "$TARGET_BRANCH" )),
458458 Collections .singletonList (new NoteToPush ("$TARGET_NAME" , note_content , Constants .R_NOTES_COMMITS , false )),
459459 true , false , true ));
460460
@@ -485,7 +485,7 @@ public void testForcePush() throws Exception {
485485
486486 GitPublisher forcedPublisher = new GitPublisher (
487487 Collections .<TagToPush >emptyList (),
488- Collections .singletonList (new BranchToPush ("origin" , "otherbranch" , false )),
488+ Collections .singletonList (new BranchToPush ("origin" , "otherbranch" )),
489489 Collections .<NoteToPush >emptyList (),
490490 true , true , true );
491491 project .getPublishersList ().add (forcedPublisher );
@@ -532,7 +532,7 @@ public void testForcePush() throws Exception {
532532 project .getPublishersList ().remove (forcedPublisher );
533533 GitPublisher unforcedPublisher = new GitPublisher (
534534 Collections .<TagToPush >emptyList (),
535- Collections .singletonList (new BranchToPush ("origin" , "otherbranch" , false )),
535+ Collections .singletonList (new BranchToPush ("origin" , "otherbranch" )),
536536 Collections .<NoteToPush >emptyList (),
537537 true , true , false );
538538 project .getPublishersList ().add (unforcedPublisher );
@@ -582,7 +582,7 @@ public void testMergeAndPushWithSkipTagEnabled() throws Exception {
582582
583583 project .getPublishersList ().add (new GitPublisher (
584584 Collections .<TagToPush >emptyList (),
585- Collections .singletonList (new BranchToPush ("origin" , "integration" , false )),
585+ Collections .singletonList (new BranchToPush ("origin" , "integration" )),
586586 Collections .<NoteToPush >emptyList (),
587587 true , true , false ));
588588
@@ -613,9 +613,12 @@ public void testRebaseBeforePush() throws Exception {
613613 Collections .<GitSCMExtension >emptyList ());
614614 project .setScm (scm );
615615
616+ BranchToPush btp = new BranchToPush ("origin" , "master" );
617+ btp .setRebaseBeforePush (true );
618+
616619 GitPublisher rebasedPublisher = new GitPublisher (
617620 Collections .<TagToPush >emptyList (),
618- Collections .singletonList (new BranchToPush ( "origin" , "master" , true ) ),
621+ Collections .singletonList (btp ),
619622 Collections .<NoteToPush >emptyList (),
620623 true , true , true );
621624 project .getPublishersList ().add (rebasedPublisher );
@@ -698,7 +701,7 @@ private void checkEnvVar(FreeStyleProject project, String envName, String envVal
698701 String noteValue = "note for " + envValue ;
699702 GitPublisher publisher = new GitPublisher (
700703 Collections .singletonList (new TagToPush ("origin" , tagNameReference , tagMessageReference , false , true )),
701- Collections .singletonList (new BranchToPush ("origin" , envReference , false )),
704+ Collections .singletonList (new BranchToPush ("origin" , envReference )),
702705 Collections .singletonList (new NoteToPush ("origin" , noteReference , Constants .R_NOTES_COMMITS , false )),
703706 true , true , true );
704707 assertTrue (publisher .isForcePush ());
0 commit comments