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

[JENKINS-69756] Improve test coverage #362

Merged

Conversation

nikhilt1933
Copy link
Contributor

@nikhilt1933 nikhilt1933 commented Dec 2, 2024

Improve test coverage for the node label parameter plugin
This is part of JENKINS-69756

Test coverage before:
Screenshot 2024-12-02 at 5 24 54 PM
image

Test coverage after:
image
image

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
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@nikhilt1933 nikhilt1933 requested a review from a team as a code owner December 2, 2024 12:01
@github-actions github-actions bot added the tests Automated test addition or improvement label Dec 2, 2024
Increase chances that a test will not accidentally match a commonly used string.
The two arguments are both required in order to throw the exception

Also checks that the build fails as expected
Also asserts that validateBuild passes in the success case
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.

Thanks very much! I've added a few more cases to the tests and added some comments that will help my future self when I am looking at these tests.

My comments are in the commit messages associated with each of the changes. Thanks again!

@MarkEWaite MarkEWaite changed the title [JENKINS-69756] Improve test coverage for node label parameter plugin [JENKINS-69756] Improve test coverage Dec 2, 2024
@MarkEWaite MarkEWaite enabled auto-merge (squash) December 2, 2024 13:28
@MarkEWaite MarkEWaite merged commit 9d9e217 into jenkinsci:master Dec 2, 2024
18 checks passed
@nikhilt1933 nikhilt1933 deleted the JENKINS-69756-improve-test-coverage branch December 2, 2024 13:34
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.

2 participants