Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tests/test_noema_refreshed_app_identity.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""Regression coverage for refreshed Noema GitHub App credentials."""

from scripts.ci import noema_review_gate as noema


def test_current_actor_accepts_refreshed_github_app_binding(monkeypatch):
"""A renewed installation token keeps the same independently bound App actor."""
monkeypatch.setenv("NOEMA_REVIEW_ACTOR", "cwl-noema-review[bot]")
monkeypatch.setenv("NOEMA_REVIEW_INSTALLATION_ID", "146401636")
monkeypatch.setenv(
"NOEMA_REVIEW_TOKEN_SOURCE",
"noema-review-github-app-refresh",
)
monkeypatch.setattr(
noema,
"run",
lambda *args, **kwargs: (_ for _ in ()).throw(
AssertionError("bound GitHub App metadata should avoid API fallback")
),
)

assert noema.current_actor() == "cwl-noema-review[bot]"
Loading