Clean up obtaining bearer tokens for registries#2480
Merged
Conversation
Remove an unnecessary cast. Should not change (test) behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
We will want to add locks and more to the in-memory type; sharing that with JSON gets awkward, and an explicit separation between the externally-imposed structure and internal records is cleaner anyway. For now, just introduces a separate type with the same structure, should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
No need to make it a public field now. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
That's the value that really matters, not the inputs; and we will remove the inputs from bearerToken. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
These fields need to exist when parsing JSON; but we can just record the outcome of processing them. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Only moves unchanged code, should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Member
|
LGTM |
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.
This is a few refactors currently living in #1968, split for separate review and merging — without the substance of that feature.
The net effect of this PR is to decrease memory requirements a tiny bit, and to add make tests a tiny bit more relevant and decoupled.
See individual commit messages for details.