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

Move testDoNotifyCommitWithInvalidApiToken and use JenkinsRule #1621

Merged

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Aug 3, 2024

Move testDoNotifyCommitWithInvalidApiToken and use JenkinsRule

The GitStepTest already includes logic that uses notifyCommit to start jobs and perform other tests of notifyCommit. Use that logic to replace the mocked testDoNotifyCommitWithInvalidApiToken with a test that uses web requests to a JenkinsRule based test.

Prepare for Jetty 12 EE 9 transition.

Also removes unused GitSCMTest methods that were detected while reading the code.

Testing done

Confirmed that tests pass on my Linux computer with Java 21.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Allow callers to provide their own access token
The GitStepTest already includes logic that uses notifyCommit to start
jobs and perform other tests of notifyCommit.  Use that logic to
replace the mocked testDoNotifyCommitWithInvalidApiToken with a test
that uses web requests to a JenkinsRule based test.

Prepare for Jetty 12 EE 9 transition.
@MarkEWaite MarkEWaite added the tests Automated test addition or improvement label Aug 3, 2024
@MarkEWaite MarkEWaite requested a review from a team as a code owner August 3, 2024 16:07
@MarkEWaite MarkEWaite merged commit 4b714b6 into jenkinsci:master Aug 3, 2024
17 checks passed
@MarkEWaite MarkEWaite deleted the stop-mocking-in-notifyCommit-test branch August 3, 2024 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Automated test addition or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant