Skip to content

Commit 941fc6f

Browse files
committed
test: cover client id and release PR metadata
1 parent ce92568 commit 941fc6f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎tests/test_release_prepare_action.py‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,22 @@ def test_prepare_composes_policy_contracts_and_scoped_mutation(self) -> None:
2626
self.assertIn("permission-contents: write", content)
2727
self.assertIn("permission-pull-requests: write", content)
2828
self.assertNotIn("permission-workflows: write", content)
29+
self.assertIn("client-id: ${{ steps.app-identity.outputs.client-id }}", content)
30+
self.assertNotIn("app-id: ${{ inputs.app-id }}", content)
2931
self.assertIn("release:prepare", content)
32+
self.assertIn("Apply release pull request metadata", content)
33+
self.assertIn('"assignees"=>[$argv[1]]', content)
34+
self.assertIn('"milestone"=>(int)$argv[2]', content)
3035

3136
def test_prepare_validates_mutation_credentials_before_planning(self) -> None:
3237
content = ACTION.read_text(encoding="utf-8")
3338
validate = content.index("Validate GitHub App credentials")
3439
plan = content.index("Build release plan")
3540
self.assertLess(validate, plan)
36-
self.assertIn("LIBRECODE_WORKFLOW_APP_ID", content)
3741
self.assertIn("LIBRECODE_WORKFLOW_APP_PRIVATE_KEY", content)
38-
self.assertIn('[[ ! "${RELEASE_APP_ID}" =~ ^[0-9]+$ ]]', content)
42+
self.assertIn("librecode-workflow-automation", content)
43+
self.assertIn("/apps/${RELEASE_APP_SLUG}", content)
44+
self.assertIn('"client_id"', content)
3945

4046
def test_prepare_persists_plan_and_preparation_by_pr_number(self) -> None:
4147
content = ACTION.read_text(encoding="utf-8")

0 commit comments

Comments
 (0)