Skip to content

Commit

Permalink
Merge pull request #149 from amuniz/bad-tests
Browse files Browse the repository at this point in the history
This tests are failing when running on the PCT
  • Loading branch information
fcojfernandez authored Jun 4, 2020
2 parents 47de187 + 642dc1c commit b6443bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ private void copyViaHttp(Folder f, JenkinsRule.WebClient wc, String fromName, St
@Issue("JENKINS-58282")
@Test public void shouldHaveHealthMetricConfiguredGloballyOnCreation() throws Exception {
assertThat("by default, global configuration should have all folder health metrics",
AbstractFolderConfiguration.get().getHealthMetrics(), hasSize(FolderHealthMetricDescriptor.all().size()));
AbstractFolderConfiguration.get().getHealthMetrics(), hasSize((int) FolderHealthMetricDescriptor.all().stream().filter(d -> d.createDefault() != null).count()));

Folder folder = r.jenkins.createProject(Folder.class, "myFolder");
DescribableList<FolderHealthMetric, FolderHealthMetricDescriptor> healthMetrics = folder.getHealthMetrics();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void testInitialization() {
@Test
public void shouldBeAbleToRemoveHealthMetricConfiguredGlobally() throws Exception {
assertThat("by default, global configuration should have all folder health metrics",
AbstractFolderConfiguration.get().getHealthMetrics(), hasSize(FolderHealthMetricDescriptor.all().size()));
AbstractFolderConfiguration.get().getHealthMetrics(), hasSize((int) FolderHealthMetricDescriptor.all().stream().filter(d -> d.createDefault() != null).count()));

HtmlForm cfg = r.createWebClient().goTo("configure").getFormByName("config");
for (HtmlElement element : cfg.getElementsByAttribute("div", "name", "healthMetrics")) {
Expand Down

0 comments on commit b6443bb

Please sign in to comment.