Add tests for jira-release-sync action#6
Merged
jonathangreen merged 4 commits intomainfrom May 1, 2026
Merged
Conversation
|
Claude finished @jonathangreen's task in 2m 57s —— View job Review
The test infrastructure is well-designed. The readiness-probe fix ( A few observations for the author's awareness:
|
The previous probe hit /rest/api/3/project/PP/versions, which mock_jira recorded into the request log and made the assert step fail with an unexpected leading GET.
…failure path Covers three previously untested branches: release-body-file fallback, non-default jira-project-key, and Jira API failure mid-action. Adds a --fail-on flag to mock_jira.py for fault injection and a per-case continue-on-error/outcome check in the workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an end-to-end test workflow for the
jira-release-syncaction that runs on every PR touchingjira-release-sync/**.The workflow:
mock_jira.pyHTTP server that implements just enough of the Jira REST API surface used byaction.yml(create version, list versions, link related work, update issue fixVersions) and records every request to a JSONL log.assert_calls.pythat the recorded requests match a per-case expectations JSON file.Two matrix cases are exercised:
with_keys— release body containsPP-*references (including a duplicate and a different-project key that must be ignored), expecting fixVersions updates.no_keys— release body has no ticket references, expecting only the version + related-work calls.Motivation and Context
The
jira-release-syncaction had no automated coverage, so regressions like the recentrelease-bodyhandling fix (#4) could only be caught manually. This gives us a reproducible safety net for future changes to the action.How Has This Been Tested?
test-jira-release-sync.ymlis the test plan — it will run on this PR.Checklist