Skip to content

package verify plugin ci tests fixes#4700

Draft
vaibhavdaren wants to merge 2 commits intovaibhav-package-verify-pluginfrom
vaibhav-package-verify-plugin-ci-fix
Draft

package verify plugin ci tests fixes#4700
vaibhavdaren wants to merge 2 commits intovaibhav-package-verify-pluginfrom
vaibhav-package-verify-plugin-ci-fix

Conversation

@vaibhavdaren
Copy link
Contributor

@vaibhavdaren vaibhavdaren commented Mar 15, 2026

Check Tests are working,

Note: Will close this once #4699 is merged. Will Rebase the plugin PR on top of it.

vaibhavdaren and others added 2 commits March 15, 2026 07:21
The three TestJiraLink tests were making real network requests to
https://issues.redhat.com/rest/api/2/serverInfo because the jira.JIRA()
constructor validates the connection on init. Only add_simple_link was
mocked, so the constructor hit the live server and failed with 503.

Fix by mocking the entire jira.JIRA class instead of only add_simple_link.
This prevents the constructor from making any network call and fully
isolates the tests from the network.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move the repeated @patch decorators from each test method to the class
level. All three tests share the same two mocks, so applying them once
at the class level reduces duplication and makes it easier to add
new tests in the future.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vaibhavdaren vaibhavdaren added the ci | full test Pull request is ready for the full test execution label Mar 15, 2026
@vaibhavdaren vaibhavdaren changed the title Vaibhav package verify plugin ci fix package verify plugin ci tests fixes Mar 15, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the Jira link tests in tests/unit/test_utils.py. Common mock patches for jira.JIRA and tmt.config.Config.fmf_tree have been moved from individual test methods to the TestJiraLink class level to reduce code duplication. The test methods have been updated to work with the class-level mocks. No issues were found during the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci | full test Pull request is ready for the full test execution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant