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

awsutil: add ability to mock IAM and STS APIs #12

Merged
merged 2 commits into from
Oct 6, 2021

Conversation

vancluever
Copy link
Contributor

This adds the ability to supply mock IAM and STS interfaces to use with
the RotateKeys, CreateAccessKey, DeleteAccessKey, and GetCallerIdentity
methods.

Additionally, work has been done to incorporate the existing IAM mock
object into the package, in addition to adding a similar STS mock that
allows for the mocking of the GetCallerIdentity method.

Factory functions are also included to allow these to be incorporated
seamlessly into the call path, in addition to allowing for introspection
into any session data being received by the constructor functions.

This adds the ability to supply mock IAM and STS interfaces to use with
the RotateKeys, CreateAccessKey, DeleteAccessKey, and GetCallerIdentity
methods.

Additionally, work has been done to incorporate the existing IAM mock
object into the package, in addition to adding a similar STS mock that
allows for the mocking of the GetCallerIdentity method.

Factory functions are also included to allow these to be incorporated
seamlessly into the call path, in addition to allowing for introspection
into any session data being received by the constructor functions.
@vancluever vancluever requested a review from jefferai October 1, 2021 21:54
jefferai
jefferai previously approved these changes Oct 2, 2021
Copy link
Member

@jefferai jefferai left a comment

Choose a reason for hiding this comment

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

Looks great!

@jefferai
Copy link
Member

jefferai commented Oct 2, 2021

@calvn Do you want you or someone else to do an additional review?

calvn
calvn previously approved these changes Oct 4, 2021
@vancluever vancluever dismissed stale reviews from calvn and jefferai via d07ba63 October 4, 2021 21:11
@vancluever
Copy link
Contributor Author

@calvn @jefferai just added one more update to this (ability to make a mock option that errors out). Can you give it one more quick check before merging? Ty!

@jefferai
Copy link
Member

jefferai commented Oct 6, 2021

@vancluever Talked to @calvn and he's fine with merging this as-is, so merging!

@jefferai jefferai merged commit f7bda98 into main Oct 6, 2021
@jefferai jefferai deleted the vancluever-add-iam-sts-mocking branch October 6, 2021 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants