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

add test for test-logging-tx-observer #1630

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

tunedev
Copy link
Contributor

@tunedev tunedev commented Sep 11, 2024

Checklist

  • A link to the issue/user story that the pull request relates to
  • How to recreate the problem without the fix
  • Design of the fix
  • How to prove that the fix works
  • Automated tests that prove the fix keeps on working
  • Documentation - any JSDoc, website, or Stackoverflow answers?

Issue/User story

Partially addresses #1606

Steps to Reproduce

Existing issues

Design of the fix

Validation of the fix

After this PR: Running the tests in caliper-core the listed %stmts in the code coverage report should tally with the below listed

  • caliper-core/lib/worker/tx-observers/logging-tx-observer.js: 100

Before the PR: Running the tests in caliper-core the listed %stmts in the code coverage report the below listed was what was there before

  • caliper-core/lib/worker/tx-observers/logging-tx-observer.js: 0

Automated Tests

What documentation has been provided for this pull request

@tunedev tunedev requested a review from a team September 11, 2024 09:26
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

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

Sorry, needs a few changes here. It also breaks the build (see the build details in the PR and github actions). Please run the unit and integration tests before submitting the PR to avoid this

@tunedev tunedev force-pushed the test-logging-tx-observer branch 2 times, most recently from df57bac to 02b94a9 Compare October 2, 2024 15:34
@tunedev tunedev requested a review from davidkel October 8, 2024 19:00
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

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

One last change

});

describe('On initialization', () => {
it('should set up the logger with default settings if no options are provided', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to change this test, logStubs.info will always exist because you create it in the test. So the test doesn't actually prove anything

@tunedev
Copy link
Contributor Author

tunedev commented Oct 10, 2024 via email

Signed-off-by: Babatunde Sanusi <[email protected]>
Copy link
Contributor

@davidkel davidkel left a comment

Choose a reason for hiding this comment

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

LGTM

@davidkel davidkel merged commit 6082ede into hyperledger-caliper:main Nov 6, 2024
17 checks passed
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.

2 participants