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

Add a test for RunBadgeAction #249

Merged
merged 4 commits into from
Oct 8, 2023

Conversation

Subhojit-Dey1234
Copy link
Contributor

@Subhojit-Dey1234 Subhojit-Dey1234 commented Oct 8, 2023

[JENKINS-70464] Added test case for RunBadgeAction

Added Test cases
Jira issue - JENKINS-70464

Testing done

  • 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

@Subhojit-Dey1234 Subhojit-Dey1234 requested a review from a team as a code owner October 8, 2023 07:55
@MarkEWaite
Copy link
Contributor

Thanks @Subhojit-Dey1234 . You'll need to run mvn spotless:apply to format the source files according to the standard required by the mvn verify step.

@Subhojit-Dey1234
Copy link
Contributor Author

@MarkEWaite thanks for mentioning. I have updated.

@abhishekmaity
Copy link
Contributor

tagging #114 for getting it added in the list

Copy link
Contributor

@abhishekmaity abhishekmaity left a comment

Choose a reason for hiding this comment

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

Looks okay

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

I generally prefer to avoid mock objects when I can test the object with a JenkinsRule based test. The JenkinsRule based test is closer to the way the object is used in a real Jenkins controller.

The mock tests that remain are tests that I could not see how to easily duplicate with a JenkinsRule test. The getUrl test should be feasible by using a JenkinsRule that invokes a WebClient. However, I ran out of time to do that additional effort.

Very nice pull request. Ready to merge once the CI job passes.

@MarkEWaite MarkEWaite added the tests Automated test addition or improvement label Oct 8, 2023
@MarkEWaite MarkEWaite changed the title JENKINS-70464 | Added test case for RunBadgeAction Add a test for RunBadgeAction Oct 8, 2023
@MarkEWaite MarkEWaite merged commit ce169d5 into jenkinsci:master Oct 8, 2023
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.

3 participants