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

chore: unit test the aws module #44

Closed
wants to merge 24 commits into from
Closed

Conversation

iliapolo
Copy link
Contributor

We don't have unit tests that assert the behavior of the DefaultAwsClient in the aws.ts module. This means that, for example, we don't assert that when it assumes a role, it passes all necessary arguments to the AWS.ChainableTemporaryCredentials function. This PR adds the ground work for adding such tests, as well as two starter tests which cover the above mentioned gap.

Note: This was surfaced while reviewing #40

TheRealAmazonKendra and others added 21 commits August 5, 2024 12:57
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10257976005

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10275852420

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10293667126

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10311424404

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10327336851

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10335506332

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10361382461

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10375384595

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10396583277

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10412445470

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10427873300

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10436277052

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10462960595

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10481180148

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10499497071

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10517607562

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10534036294

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10551287221

------

*Automatically created by projen via the "upgrade-main" workflow*
Upgrades project dependencies. See details in [workflow run].

[Workflow Run]: https://github.com/cdklabs/cdk-assets/actions/runs/10569355571

------

*Automatically created by projen via the "upgrade-main" workflow*
@iliapolo iliapolo requested a review from a team August 27, 2024 12:21
});
});

export function withMocked<A extends object, K extends keyof A, B>(
Copy link
Contributor Author

@iliapolo iliapolo Aug 27, 2024

Choose a reason for hiding this comment

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

@iliapolo iliapolo changed the base branch from main to v2-main August 29, 2024 06:31
@iliapolo
Copy link
Contributor Author

Intentionally targeted to v2-main so it won't be delayed by v3 launch. I will create an equivalent PR to main as well.

@iliapolo
Copy link
Contributor Author

Closing. The changes here will be included in #40

@iliapolo iliapolo closed this Aug 31, 2024
@iliapolo iliapolo deleted the epolon/aws-client-tests branch August 31, 2024 14:17
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