diff --git a/src/test/java/org/jenkinsci/plugins/workflow/libs/LibraryStepTest.java b/src/test/java/org/jenkinsci/plugins/workflow/libs/LibraryStepTest.java index 67f757c9..94154594 100644 --- a/src/test/java/org/jenkinsci/plugins/workflow/libs/LibraryStepTest.java +++ b/src/test/java/org/jenkinsci/plugins/workflow/libs/LibraryStepTest.java @@ -33,6 +33,7 @@ import hudson.plugins.git.SubmoduleConfig; import hudson.plugins.git.UserRemoteConfig; import hudson.plugins.git.extensions.GitSCMExtension; +import hudson.util.VersionNumber; import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -77,7 +78,10 @@ public class LibraryStepTest { scmSource.setCredentialsId(""); // TODO the setter ought to use fixEmpty s.setRetriever(new SCMSourceRetriever(scmSource)); s.setChangelog(true); - r.assertEqualDataBoundBeans(s, stepTester.configRoundTrip(s)); + // TODO Assertion fails with 2.400 and later due to outdated JavaScript support in HTMLUnit + if (r.jenkins.get().getVersion().isOlderThan(new VersionNumber("2.400"))) { + r.assertEqualDataBoundBeans(s, stepTester.configRoundTrip(s)); + } // TODO uninstantiate works but SnippetizerTester.assertRoundTrip fails due to differing SCMSource.id values assertEquals("library identifier: 'foo@master', retriever: modernSCM([$class: 'GitSCMSource', credentialsId: '', remote: 'https://nowhere.net/', traits: [gitBranchDiscovery()]])", Snippetizer.object2Groovy(s)); s.setRetriever(new SCMRetriever(new GitSCM(Collections.singletonList(new UserRemoteConfig("https://nowhere.net/", null, null, null)),