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

Address JENKINS-69757 by adding tests for util class #417

Merged

Conversation

henriquepaes1
Copy link
Contributor

To improve test coverage for the plugin as described here, this PR adds tests to a class used to fill a ListBoxModel with the specified priorities. The tests asserts that lists are properly created according to the parameters passed.

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

@henriquepaes1 henriquepaes1 requested a review from a team as a code owner December 27, 2024 14:38
@github-actions github-actions bot added the tests Automated test addition or improvement label Dec 27, 2024
@yashpal2104
Copy link
Contributor

yashpal2104 commented Dec 27, 2024

Nice @henriquepaes1 this looks good and looks ready to be merged.

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! One change that I'll apply and then merge when the CI job passes.

@MarkEWaite MarkEWaite enabled auto-merge (squash) December 27, 2024 20:18
@MarkEWaite MarkEWaite merged commit e4b18a7 into jenkinsci:master Dec 27, 2024
18 checks passed
MarkEWaite added a commit that referenced this pull request Dec 29, 2024
* Bump io.jenkins.tools.bom:bom-2.452.x (#415)

* Add test for JobInclusionFolderProperty class and added a constructor in ItemInfo.java"

* Address JENKINS-69757 by adding tests for util class (#417)

* add tests for util class

* Use JUnit 4 assertions with JUnit 4 tests

---------

Co-authored-by: Mark Waite <[email protected]>

* Modified the setup method to  reuse the JobInclusionFolderProperty object

* Justify public constructor with a comment

* Use JenkinsRule name consistent with other tests

* Remove unused ItemInfo and tearDown

* Remove unnecessary changes to ItemInfo

* Create project once for all tests

* Add a few more assertions

* Remove queue related assertions

---------

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Henrique Paes <[email protected]>
Co-authored-by: Mark Waite <[email protected]>
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