hyperledger-cacti / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
344 stars 286 forks source link

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

Closed adrianbatuto closed 2 weeks ago

adrianbatuto commented 1 month ago

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

Character Limit

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

adrianbatuto commented 1 month ago

@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.

adrianbatuto commented 3 weeks ago

@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 commented 3 weeks ago

@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 commented 3 weeks ago

@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.