-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Tokens in config are no longer ignored when there are tokens in …
…the environment, part of refactoring in preparation for app token refreshing (#284) This PR continues the work started in #281, completing the major refactor. This is accomplished by creating PersonalTokenManager and AppTokenManager classes, moving logic to them, and adding tests. After this PR, I'll be able to easily implement refreshing for app tokens and other app token related features. In additional to the added unit tests, I have tested running an extractor on top of the proposed code, in a couple scenarios: with auth_token? | with additional_auth_tokens? | with personal tokens in env? | with app token? | # tokens that should be used | # tokens used in test run --|--|--|--|--|-- no | no | no | yes | 1 | 1 ✅ yes | yes (1) | no | yes | 3 | 3 ✅ no | yes (2) | no | yes | 3 | 3 ✅ I am not easily able to test the case of personal tokens being detected from the environment, just because changing the name of environment variables is not simple in my set up. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b6074c2
commit aade338
Showing
2 changed files
with
408 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.