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

feat(cdk-v2): fixing assertion tests to work with both v1 and v2 #370

Merged
merged 5 commits into from
Sep 16, 2021

Conversation

hnishar
Copy link
Contributor

@hnishar hnishar commented Sep 13, 2021

Issue #, if available:

Description of changes:
Fixing assertion tests to work with both v1 and v2 by removing the assertions for KMS permissions (which have changed from v1 to v2) and lambda asset parameters (which are no longer required in v2)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@hnishar hnishar self-assigned this Sep 13, 2021
@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 379afc7
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 57c894d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@@ -213,63 +213,6 @@ test('check the sns topic properties with existing KMS key', () => {
});

expect(stack).toHaveResource('AWS::KMS::Key', {
KeyPolicy: {
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to no longer check a good deal of stuff for correctness...why is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is asserting that customer generated CMK is used instead of the AWS managed KMS, setting this this has to produce this expected result

Copy link
Contributor

Choose a reason for hiding this comment

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

OK (it's not letting me Resolve conversation

@@ -115,64 +115,15 @@ test("test FunctionProps for no envrionment variable when runtime = PYTHON", ()
expect(stack).toHaveResource(
"AWS::Lambda::Function",
{
Type: "AWS::Lambda::Function",
Copy link
Contributor

Choose a reason for hiding this comment

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

This no longer appears to confirm the stated purpose for the test (no environment variables). I'm concerned that our changes keep the tests passing, but the tests are no longer of value.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The description of unit test is inaccurate, it's intent is to assert the runtime of lambda is python, will update the description

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: b2a50ae
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: 79bf486
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

biffgaut
biffgaut previously approved these changes Sep 16, 2021
@@ -213,63 +213,6 @@ test('check the sns topic properties with existing KMS key', () => {
});

expect(stack).toHaveResource('AWS::KMS::Key', {
KeyPolicy: {
Copy link
Contributor

Choose a reason for hiding this comment

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

OK (it's not letting me Resolve conversation

@aws-solutions-constructs-team
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: codebuildgithubautobuildPro-fkVQbXRiQi6A
  • Commit ID: dba0228
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@hnishar hnishar merged commit c4c20e4 into main Sep 16, 2021
@hnishar hnishar deleted the fix-unit-test-kms branch September 16, 2021 15:03
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