Repository navigation
test(github): the error-path tests of the GitHub App identity check the whole error - #2493
Merged
Merged
Conversation
…he whole error The tests of HTTP 422, of the missing App settings and of a key that is no RSA key compare to_dict() of the raised error with the whole expected value, so they check the error code, the exit code, the whole message and the details. The log test compares the token and the whole record of the App's logger. The test of HTTP 401 keeps its assertion: its whole message tells the operator to run gh auth login, which is wrong for the App. #2491 fixes that message.
Owner
Author
|
Test evidence, from the devcontainer, at origin/main daaffc6:
Context: this item comes from the review of #2482, which merged before the review findings arrived. The review also found that the old branch of #2482 held two commits that added and deleted the change folder again with no net diff. That branch was not pushed, so nothing on |
dan-petty
marked this pull request as ready for review
October 28, 2026 18:43
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.
The error-path tests and the log test in
tests/test_github_app_identity.pyfollow docs/TESTING.md, section "Names and assertions": an assertion compares whole values, and a test of an error path checks the error code and the exit code.to_dict()of the raised error with the whole expected value: the error code, the whole message, the exit code and the details.devops_cli.github.app_installation: the logger, the level and the message. The whole message shows that the log holds no token and no permission level.gh auth loginor to set GH_TOKEN, which is wrong for a process that acts as the App, and it drops the reason that GitHub gives. Issue fix(github): a refused JWT exchange of the GitHub App names GitHub's reason, not a gh login #2491 changes that message, and its test then compares the whole error.Before this change, the tests passed when the error code or the log message changed. Now they fail.
The change alters tests only, so its OpenSpec change has no spec delta.
Closes #2486