ExpandableMessageTest is failing because of SECURITY-170
GitHubCommitNotifierTest is failing because on newer versions of jenkins there is no BuildData available on non existing repos, this failure has been found on local PCT Runs against jenkins 2.x
How to reproduce
Compile the test
mvn clean compile test-compile
Execute the tests against 1.651.3 (for example)
mvn test -Djenkins.version=1.651.3 -Dtest=ExpandableMessageTest
* {{ExpandableMessageTest}} is failing because of SECURITY-170 * {{GitHubCommitNotifierTest}} is failing because on newer versions of jenkins there is no {{BuildData}} available on non existing repos, this failure has been found on local PCT Runs against jenkins 2.x h4. How to reproduce
Two tests are failing for different reasons * {{ExpandableMessageTest}} is failing because of SECURITY-170 * {{GitHubCommitNotifierTest}} is failing because on newer versions of jenkins there is no {{BuildData}} available on non existing repos, this failure has been found on local PCT Runs
against jenkins 2.x with the following error:
{noformat} Failed tests: GitHubCommitNotifierTest.testNoBuildRevision:102 Expected: a string containing "Cannot determine sha1 of the commit. The status cannot be reported" but: was "Legacy code started this job. No cause information is available Building in workspace /tmp/jenkinsTests.tmp/jenkins8176668873380145391test/workspace/test0 Cloning the remote Git repository Cloning repository http://non.existent.git.repo.nowhere/repo.git > git init /tmp/jenkinsTests.tmp/jenkins8176668873380145391test/workspace/test0 # timeout=10 Fetching upstream changes from http://non.existent.git.repo.nowhere/repo.git > git --version # timeout=10 > git -c core.askpass=true fetch --tags --progress http://non.existent.git.repo.nowhere/repo.git +refs/heads/*:refs/remotes/origin/* ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Command "git -c core.askpass=true fetch --tags --progress http://non.existent.git.repo.nowhere/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: unable to access 'http://non.existent.git.repo.nowhere/repo.git/': Could not resolve host: non.existent.git.repo.nowhere
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:506) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1046) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1086) at hudson.scm.SCM.checkout(SCM.java:495) at hudson.model.AbstractProject.checkout(AbstractProject.java:1278) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529) at hudson.model.Run.execute(Run.java:1720) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) ERROR: null ERROR: [GitHub Commit Status Setter] - Cannot retrieve Git metadata for the build, setting build result to FAILURE Finished: FAILURE "
{noformat}
h4. How to reproduce
* Compile the test {noformat} mvn clean compile test-compile {noformat}
* Execute the tests against 1.651.3 (for example) {noformat} mvn test -Djenkins.version=1.651.3 -Dtest=ExpandableMessageTest {noformat}