[JIRA] (JENKINS-39822) GitHub plugin functional tests broken against 1.651+

4 views
Skip to the first unread message

rarabaolaza@cloudbees.com (JIRA)

unread,
17 Nov 2016, 08:01:0317/11/2016
to jenkinsc...@googlegroups.com
Raul Arabaolaza created an issue
 
Jenkins / Improvement JENKINS-39822
GitHub plugin functional tests broken against 1.651+
Issue Type: Improvement Improvement
Assignee: Raul Arabaolaza
Components: github-plugin
Created: 2016/Nov/17 1:00 PM
Priority: Minor Minor
Reporter: Raul Arabaolaza

Description

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

    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

Or run the PCT

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

rarabaolaza@cloudbees.com (JIRA)

unread,
17 Nov 2016, 08:02:0217/11/2016
to jenkinsc...@googlegroups.com
Raul Arabaolaza updated an issue
Change By: Raul Arabaolaza
h4. Description


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
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}

Or run the PCT

rarabaolaza@cloudbees.com (JIRA)

unread,
17 Nov 2016, 08:02:0217/11/2016
to jenkinsc...@googlegroups.com

rarabaolaza@cloudbees.com (JIRA)

unread,
17 Nov 2016, 08:03:0117/11/2016
to jenkinsc...@googlegroups.com
Raul Arabaolaza started work on Improvement JENKINS-39822
 
Change By: Raul Arabaolaza
Status: Open In Progress

rarabaolaza@cloudbees.com (JIRA)

unread,
17 Nov 2016, 09:43:0117/11/2016
to jenkinsc...@googlegroups.com
Raul Arabaolaza updated an issue
h4. Description

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}

Or run the PCT

rarabaolaza@cloudbees.com (JIRA)

unread,
17 Nov 2016, 09:44:0117/11/2016
to jenkinsc...@googlegroups.com

scm_issue_link@java.net (JIRA)

unread,
28 Nov 2016, 02:01:0228/11/2016
to jenkinsc...@googlegroups.com
SCM/JIRA link daemon commented on Improvement JENKINS-39822
 
Re: GitHub plugin functional tests broken against 1.651+

Code changed in jenkins
User: Raúl Arabaolaza Barquin
Path:
src/test/java/com/cloudbees/jenkins/GitHubCommitNotifierTest.java
src/test/java/org/jenkinsci/plugins/github/common/ExpandableMessageTest.java
src/test/java/org/jenkinsci/plugins/github/common/ParametersActionHelper.java
http://jenkins-ci.org/commit/github-plugin/ebfcc1be4bdc136c842a89c495cede8bdd57ebd2
Log:
[Jenkins-39822] GitHub plugin functional tests broken against 1.651+ (#157)

  • JENKINS-39822 Make sure there is always BuildData on testNoBuildRevision
  • This way we change behaviour only if needed
  • JENKINS-39822 Invoke build getting into account git plugin version
  • Git plugin 2.4.1+ does not include BuildData if checkout fails,
    resulting in testNoBuildRevision failing

rarabaolaza@cloudbees.com (JIRA)

unread,
28 Nov 2016, 03:21:0428/11/2016
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages