Skip to content
Permalink
Browse files

[JENKINS-43507] Pick up changes for JENKINS-44891

  • Loading branch information...
stephenc committed Jun 15, 2017
1 parent 2b2ab1f commit bd430b60dbd52b7f6cf59d6e76f5faf31449aeed
@@ -66,7 +66,7 @@

<properties>
<jenkins.version>1.642.3</jenkins.version>
<scm-api.version>2.2.0-20170612.200107-11</scm-api.version>
<scm-api.version>2.2.0-20170615.114844-13</scm-api.version>
</properties>

<repositories>
@@ -101,7 +101,7 @@ public void given_multibranch_when_sourceDefined_then_sourceBrandingPresentAfter
c.createRepository("foo");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getAction(MockSCMLink.class), nullValue());
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
@@ -116,7 +116,7 @@ public void given_multibranch_when_sourceDefined_then_sourceBrandingPresentAfter
c.createRepository("foo");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getAction(MockSCMLink.class), nullValue());
fire(new MockSCMSourceEvent(SCMEvent.Type.UPDATED, c, "foo"));
r.waitUntilNoActivity();
@@ -131,7 +131,7 @@ public void given_multibranch_when_branches_then_branchBrandingPresent()
c.createRepository("foo");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
assertThat(prj.getItem("master").getAction(MockSCMLink.class), hasProperty("id", is("branch")));
@@ -145,7 +145,7 @@ public void given_multibranch_when_branches_then_runBrandingPresent()
c.createRepository("foo");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getAction(MockSCMLink.class), nullValue());
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
@@ -172,7 +172,7 @@ public void given_multibranch_when_sourceHasNonSafeNames_then_branchDisplayNameN

BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getAction(MockSCMLink.class), nullValue());
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
@@ -236,7 +236,7 @@ public void given_multibranch_when_sourceHasI18nNames_then_branchDisplayNameNotM

BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getAction(MockSCMLink.class), nullValue());
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
@@ -503,7 +503,7 @@ public void given_multibranch_when_decoratedSourceDefined_then_descriptionPresen
c.setDescription("foo", "The Foo Project of Manchu");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getDescription(), nullValue());
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
@@ -519,7 +519,7 @@ public void given_multibranch_when_decoratedSourceDefined_then_displayNamePresen
c.setDisplayName("foo", "Foo Project");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getDisplayName(), is("foo"));
assertThat(prj.getDisplayNameOrNull(), nullValue());
assertThat(prj.getAction(ObjectMetadataAction.class), nullValue());
@@ -562,7 +562,7 @@ public void given_multibranch_when_decoratedSourceDefined_then_folderIconPresent
c.setRepoIconClassName("icon-star");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat(prj.getIcon().getIconClassName(), not(is("icon-star")));
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
@@ -88,7 +88,7 @@ public void given_multibranch_when_atLeastOneSourceDefinedButNoItems_then_welcom
c.createRepository("foo");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
assertThat("We have no items", prj.getItems(), empty());
assertThat("We have the empty view when no items", prj.getViews(),
contains(instanceOf(MultiBranchProjectEmptyView.class)));
@@ -103,7 +103,7 @@ public void given_multibranch_when_onlyUncategorizedCategory_then_onlyUncategori
Integer crNum = c.openChangeRequest("foo", "master");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches())));
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
assertThat(prj.getItems(),
@@ -130,7 +130,7 @@ public void given_multibranch_when_changeRequestsWanted_then_onlyUncategorizedAn
Integer crNum = c.openChangeRequest("foo", "master");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches(), new MockSCMDiscoverChangeRequests())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches(), new MockSCMDiscoverChangeRequests())));
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
assertThat(prj.getItems(),
@@ -164,7 +164,7 @@ public void given_multibranch_when_tagsWanted_then_onlyUncategorizedAndTagsViews
Integer crNum = c.openChangeRequest("foo", "master");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches(), new MockSCMDiscoverTags())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches(), new MockSCMDiscoverTags())));
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
assertThat(prj.getItems(),
@@ -198,7 +198,7 @@ public void given_multibranch_when_noBranchesWanted_then_uncategorizedViewPresen
Integer crNum = c.openChangeRequest("foo", "master");
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverTags(), new MockSCMDiscoverChangeRequests())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverTags(), new MockSCMDiscoverChangeRequests())));
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
assertThat(prj.getItems(),
@@ -244,7 +244,7 @@ public void given_multibranch_when_wantsEverything_then_hasEverything()
c.addFile("foo", "change-request/" + crNum2, "propose change", "CHANGE", "proposed".getBytes());
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.getSourcesList().add(new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches(), new MockSCMDiscoverTags(), new MockSCMDiscoverChangeRequests())));
prj.getSourcesList().add(new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches(), new MockSCMDiscoverTags(), new MockSCMDiscoverChangeRequests())));
prj.scheduleBuild2(0).getFuture().get();
r.waitUntilNoActivity();
assertThat(prj.getItems(),
@@ -69,7 +69,7 @@ public void given_multibranch_when_buildingABranch_then_environmentContainsBranc
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.setProjectFactory(new BasicBranchProjectFactory());
BranchSource source = new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverBranches()));
BranchSource source = new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverBranches()));
source.setStrategy(
new DefaultBranchPropertyStrategy(new BranchProperty[]{new BasicDummyStepBranchProperty()}));
prj.getSourcesList().add(source);
@@ -87,7 +87,7 @@ public void given_multibranch_when_buildingAChangeRequest_then_environmentContai
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.setProjectFactory(new BasicBranchProjectFactory());
BranchSource source = new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverChangeRequests()));
BranchSource source = new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverChangeRequests()));
source.setStrategy(
new DefaultBranchPropertyStrategy(new BranchProperty[]{new BasicDummyStepBranchProperty()}));
prj.getSourcesList().add(source);
@@ -106,7 +106,7 @@ public void given_multibranch_when_buildingAChangeRequest_then_environmentContai
BasicMultiBranchProject prj = r.jenkins.createProject(BasicMultiBranchProject.class, "foo");
prj.setCriteria(null);
prj.setProjectFactory(new BasicBranchProjectFactory());
BranchSource source = new BranchSource(new MockSCMSource(null, c, "foo", new MockSCMDiscoverChangeRequests()));
BranchSource source = new BranchSource(new MockSCMSource(c, "foo", new MockSCMDiscoverChangeRequests()));
source.setStrategy(
new DefaultBranchPropertyStrategy(new BranchProperty[]{new BasicDummyStepBranchProperty()}));
prj.getSourcesList().add(source);

0 comments on commit bd430b6

Please sign in to comment.
You can’t perform that action at this time.