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

test(connector-fabric): jestify all remaining test cases #3582

Merged

Conversation

adrianbatuto
Copy link
Contributor

@adrianbatuto adrianbatuto commented Oct 10, 2024

Commit to be reviewed


test(connector-fabric): jestify all remaining test cases

Primary Changes
----------------
1. Jestified remaining tests for the connector-fabric plugin, 
excluding add-orgs.test.ts (currently skipped).
3. Removed the tests from taprc and jest.config.js

Fixes #3547

Pull Request Requirements

  • Rebased onto upstream/main branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.
  • Have git sign off at the end of commit message to avoid being marked red. You can add -s flag when using git commit command. You may refer to this link for more information.
  • Follow the Commit Linting specification. You may refer to this link for more information.

Character Limit

  • Pull Request Title and Commit Subject must not exceed 72 characters (including spaces and special characters).
  • Commit Message per line must not exceed 80 characters (including spaces and special characters).

A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.

@adrianbatuto adrianbatuto force-pushed the adrianbatuto/issue3547 branch 3 times, most recently from a7bd488 to 38fa38b Compare October 10, 2024 07:52
@adrianbatuto adrianbatuto marked this pull request as ready for review October 10, 2024 10:48
@petermetz petermetz requested a review from a team October 10, 2024 21:31
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@adrianbatuto Looking good at first (quick) look, but please:

  1. fix the failing CI checks - the jobs that used to have a single test case for them that is now a Jest test case can be deleted because all the jest test cases are getting picked up automatically by the fabric-0 job IIRC
  2. Try to encode a little more information in the commit message. The combined paths of the test cases won't fit in the commit message of course but you could use a more qualified plugin name ('connector-fabric') and also say that it's "all the remaining" tests being jestified

@adrianbatuto
Copy link
Contributor Author

adrianbatuto commented Oct 11, 2024

@adrianbatuto Looking good at first (quick) look, but please:

  1. fix the failing CI checks - the jobs that used to have a single test case for them that is now a Jest test case can be deleted because all the jest test cases are getting picked up automatically by the fabric-0 job IIRC
  2. Try to encode a little more information in the commit message. The combined paths of the test cases won't fit in the commit message of course but you could use a more qualified plugin name ('connector-fabric') and also say that it's "all the remaining" tests being jestified

Hi peter, I removed the unnecessary CI checks except one which has to do with add-orgs.test.ts. I didn't include this in my changes because the test is currently being skipped.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@adrianbatuto The commit subject is still the same. Please see my point 2) from earlier.

@adrianbatuto adrianbatuto changed the title test(fabric): jestify test cases test(connector-fabric): jestify all remaining test cases Oct 14, 2024
@adrianbatuto adrianbatuto force-pushed the adrianbatuto/issue3547 branch 2 times, most recently from d5fb550 to 321eb4e Compare October 14, 2024 09:26
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

LGTM

@petermetz petermetz requested a review from a team October 18, 2024 02:48
Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@adrianbatuto Please fix the merge conflicts and then pass it back for review

Copy link
Contributor

@outSH outSH left a comment

Choose a reason for hiding this comment

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

Thanks, looks great, I've just left one small comment

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@adrianbatuto: Hopefully the last change request: There is one fabric test that is still not migrated to jest from what I can tell: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts

@adrianbatuto
Copy link
Contributor Author

@adrianbatuto: Hopefully the last change request: There is one fabric test that is still not migrated to jest from what I can tell: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts

@petermetz I opted not to migrate this test to jest since this test is being skipped at the moment. Should I also include this in my PR?

@petermetz
Copy link
Contributor

@adrianbatuto: Hopefully the last change request: There is one fabric test that is still not migrated to jest from what I can tell: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts

@petermetz I opted not to migrate this test to jest since this test is being skipped at the moment. Should I also include this in my PR?

@adrianbatuto Yeah, if it's being skipped it means right now it's broken, but even then, let's just migrate it over and we can fix the test itself later. Just make sure that the test runs (doesn't have to succeed, but it has to compile and run OK even if it fails the assertions at some point).
Please also make sure to mark it skipped after the migration to jest is done.

@adrianbatuto
Copy link
Contributor Author

@adrianbatuto: Hopefully the last change request: There is one fabric test that is still not migrated to jest from what I can tell: packages/cactus-plugin-ledger-connector-fabric/src/test/typescript/integration/fabric-v2-2-x/add-orgs.test.ts

@petermetz I opted not to migrate this test to jest since this test is being skipped at the moment. Should I also include this in my PR?

@adrianbatuto Yeah, if it's being skipped it means right now it's broken, but even then, let's just migrate it over and we can fix the test itself later. Just make sure that the test runs (doesn't have to succeed, but it has to compile and run OK even if it fails the assertions at some point). Please also make sure to mark it skipped after the migration to jest is done.

Got it.

Copy link
Contributor

@petermetz petermetz left a comment

Choose a reason for hiding this comment

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

@adrianbatuto LGTM, thank you for the updates!

Primary Changes
----------------
1. Jestified remaining tests for the connector-fabric plugin,
excluding add-orgs.test.ts (currently skipped).
2. Removed the tests from taprc and jest.config.js

Fixes hyperledger-cacti#3547

Signed-off-by: adrianbatuto <[email protected]>
@petermetz petermetz merged commit 35f31fa into hyperledger-cacti:main Nov 1, 2024
134 of 136 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.

test(fabric): jestify test cases
3 participants