Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move iam-specific functionality to a shared class #150

Merged
merged 4 commits into from
Aug 3, 2021

Conversation

dpopp07
Copy link
Member

@dpopp07 dpopp07 commented Aug 3, 2021

This will allow other token managers that interact with the IAM service to share configuration and functionality. This change is being made in advance of a new container-based token manager being added that will utilize this shared functionality, as it will interact with the IAM service as well.

cc @pyrooka

This will allow other authenticators that interact with the IAM
service to share configuration and functionality.
@dpopp07 dpopp07 requested a review from padamstx August 3, 2021 20:37
@@ -119,294 +141,5 @@ describe('iam_token_manager_v1', () => {
const token = await instance.getToken();
expect(token).toBe(ACCESS_TOKEN);
expect(requestMock).not.toHaveBeenCalled();
done();
});

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these tests below were consolidated and are covered by the tests for the new IAM request based token manager

expect(logger.verbose.enabled).toBeFalsy();
expect(logger.info.enabled).toBeFalsy();
expect(logger.error.enabled).toBeFalsy();
expect(logger.debug.enabled).toBeFalsy();
Copy link
Member Author

@dpopp07 dpopp07 Aug 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were failing locally. Honestly, I'm not sure how they were ever passing. We never set those fields to false

Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dpopp07 dpopp07 merged commit 796a4eb into main Aug 3, 2021
@dpopp07 dpopp07 deleted the dp/refactor-iam-token-manager branch August 3, 2021 21:45
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 2.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants