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(logger): add e2e tests for logger #529

Merged
merged 11 commits into from
Feb 15, 2022
Merged

feat(logger): add e2e tests for logger #529

merged 11 commits into from
Feb 15, 2022

Conversation

ijemmy
Copy link
Contributor

@ijemmy ijemmy commented Jan 31, 2022

Description of your changes

Add e2e tests for logger

Currently, we only have e2e tests for metrics and tracer. This PR adds e2e tests similar to the other two modules.

How to verify this change

Run AWS_PROFILE=<YOUR_PROFILE_NAME> AWS_REGION=eu-central-1 npx jest --group=e2e/logger/

Here's the output:

Test Suites: 3 passed, 3 of 8 total
Tests:       13 passed, 13 total
Snapshots:   0 total
Time:        114.482 s

Related issues, RFCs

#353

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

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

Copy link
Contributor

@flochaz flochaz left a comment

Choose a reason for hiding this comment

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

LGTM except cdk link

CONTRIBUTING.md Outdated Show resolved Hide resolved
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Already looking good!

Just left some comments on the files, plus this one:

  • Some files contain a copyright notice while others don't, the rest of the project also doesn't contain any so we should settle on one

packages/logger/tests/helpers/InvocationLog.ts Outdated Show resolved Hide resolved
packages/logger/tests/e2e/basicFeatures.middy.test.ts Outdated Show resolved Hide resolved
ijemmy and others added 2 commits February 1, 2022 16:15
@ijemmy
Copy link
Contributor Author

ijemmy commented Feb 1, 2022

@flochaz @dreamorosi Thanks for the catches. They have been fixed.

dreamorosi
dreamorosi previously approved these changes Feb 1, 2022
@dreamorosi dreamorosi self-requested a review February 1, 2022 15:37
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Just ran the e2e tests here on GitHub and it failed, it seems there are issues with the stack deployment based on the errors.

@dreamorosi dreamorosi dismissed their stale review February 1, 2022 15:39

Ran e2e tests and saw failed run

@ijemmy
Copy link
Contributor Author

ijemmy commented Feb 11, 2022

@dreamorosi Logger uses eu-central-1 for unit test. I need to CDK bootstrap the region.

I am considering changing everything to eu-west-1. But that will affect unit testing so I will discuss with @saragerion first.

@dreamorosi dreamorosi self-requested a review February 14, 2022 11:10
Copy link
Contributor

@flochaz flochaz left a comment

Choose a reason for hiding this comment

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

LGTM !

@ijemmy ijemmy merged commit e736b65 into main Feb 15, 2022
@ijemmy ijemmy deleted the feat/e2e-logger-cleaned branch February 15, 2022 09:47
@ijemmy ijemmy restored the feat/e2e-logger-cleaned branch February 15, 2022 09:49
@ijemmy
Copy link
Contributor Author

ijemmy commented Feb 15, 2022

fyi, 1 check didn't pass (e2e) test.

It's a flaky test from metric, not logger. I have rerun and everything is green https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/1846184047

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