Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Infra mock in PiplineUnit #130

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

darxriggs
Copy link
Contributor

Use same types in method signatures as in the real implementation.
Use default maps constructor to get named parameters.

It requires pull request #129 to be merged beforehand.

@jenkinsadmin
Copy link

Build failed; the context from the latest run is:

Expand to view
[2019-12-31T14:17:19.566Z]    infra.withDockerCredentials(groovy.lang.Closure)
[2019-12-31T14:17:19.566Z]       infra.withCredentials([{$class=ZipFileBinding, credentialsId=jenkins-dockerhub, variable=DOCKER_CONFIG}], groovy.lang.Closure)
[2019-12-31T14:17:19.566Z]    infra.checkout(foo.git)
[2019-12-31T14:17:19.823Z]    infra.withDockerCredentials(groovy.lang.Closure)
[2019-12-31T14:17:19.823Z]       infra.echo(Cannot use Docker credentials outside of jenkins infra environment)
[2019-12-31T14:17:19.823Z] [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.49 s - in InfraStepTests
[2019-12-31T14:17:20.081Z] [INFO] 
[2019-12-31T14:17:20.081Z] [INFO] Results:
[2019-12-31T14:17:20.081Z] [INFO] 
[2019-12-31T14:17:20.081Z] [ERROR] Errors: 
[2019-12-31T14:17:20.081Z] [ERROR]   CustomWARPackagerStepTests.test_default_config:144 » MissingMethod No signatur...
[2019-12-31T14:17:20.081Z] [ERROR]   CustomWARPackagerStepTests.test_without_bom_config:131 » MissingMethod No sign...
[2019-12-31T14:17:20.081Z] [INFO] 
[2019-12-31T14:17:20.081Z] [ERROR] Tests run: 45, Failures: 0, Errors: 2, Skipped: 1
[2019-12-31T14:17:20.081Z] [INFO] 
[2019-12-31T14:17:20.081Z] [INFO] ------------------------------------------------------------------------
[2019-12-31T14:17:20.081Z] [INFO] BUILD FAILURE
[2019-12-31T14:17:20.081Z] [INFO] ------------------------------------------------------------------------
[2019-12-31T14:17:20.081Z] [INFO] Total time:  15.619 s
[2019-12-31T14:17:20.081Z] [INFO] Finished at: 2019-12-31T14:17:19Z
[2019-12-31T14:17:20.081Z] [INFO] ------------------------------------------------------------------------
[2019-12-31T14:17:20.081Z] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project pipeline-library: There are test failures.
[2019-12-31T14:17:20.081Z] [ERROR] 
[2019-12-31T14:17:20.081Z] [ERROR] Please refer to /home/jenkins/workspace/Infra_pipeline-library_PR-130/target/surefire-reports for the individual test results.
[2019-12-31T14:17:20.081Z] [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[2019-12-31T14:17:20.081Z] [ERROR] -> [Help 1]
[2019-12-31T14:17:20.081Z] [ERROR] 
[2019-12-31T14:17:20.081Z] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[2019-12-31T14:17:20.081Z] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[2019-12-31T14:17:20.081Z] [ERROR] 
[2019-12-31T14:17:20.081Z] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[2019-12-31T14:17:20.081Z] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[2019-12-31T14:17:20.470Z] Post stage
[2019-12-31T14:17:20.539Z] [Pipeline] junit
[2019-12-31T14:17:20.551Z] Recording test results
[2019-12-31T14:17:21.404Z] [Pipeline] }
[2019-12-31T14:17:21.440Z] [Pipeline] // stage
[2019-12-31T14:17:21.466Z] [Pipeline] }
[2019-12-31T14:17:21.497Z] [Pipeline] // timestamps
[2019-12-31T14:17:21.526Z] [Pipeline] }
[2019-12-31T14:17:21.555Z] [Pipeline] // withEnv
[2019-12-31T14:17:21.580Z] [Pipeline] }
[2019-12-31T14:17:21.613Z] [Pipeline] // node
[2019-12-31T14:17:21.656Z] [Pipeline] End of Pipeline
[2019-12-31T14:17:23.240Z] 
[2019-12-31T14:17:23.240Z] GitHub has been notified of this commit’s build result
[2019-12-31T14:17:23.240Z] 
[2019-12-31T14:17:23.240Z] ERROR: script returned exit code 1
[2019-12-31T14:17:23.240Z] Finished: FAILURE

Powered by the Comment Logger

Use same types in method signatures as in the real implementation.
Use default maps constructor to get named parameters.
@darxriggs darxriggs marked this pull request as ready for review January 1, 2020 11:57
@darxriggs darxriggs requested a review from a team as a code owner January 1, 2020 11:57
Copy link
Contributor

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, CC @v1v

@oleg-nenashev oleg-nenashev changed the title Improve Infra mock Improve Infra mock in PiplineUnit Jan 1, 2020
@darxriggs
Copy link
Contributor Author

@v1v I am not sure if @oleg-nenashev is waiting for your reply. So I think it would be a good idea that you provide a quick reply.

I am waiting for this to be merged because I have another pull request in preparation that depends on it.

@oleg-nenashev
Copy link
Contributor

Merging it since to response from @v1v

@oleg-nenashev oleg-nenashev merged commit b36e6ee into jenkins-infra:master Jan 14, 2020
@darxriggs darxriggs deleted the improve-infra-mock branch January 14, 2020 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants