hyperledger / fabric-admin-sdk

Fabric SDK for Admin Capability services
Apache License 2.0
31 stars 19 forks source link

Prototype fast integration tests using Microfab #58

Closed bestbeforetoday closed 1 year ago

bestbeforetoday commented 1 year ago

@SamYuan1990 Let me know what you think about the approach taken in this PR of using Microfab to stand up a Fabric network for integration testing of chaincode lifecycle. Most of the time is taken downloading Docker images and Go dependencies. Standing up the Fabric network looks to take around 3 seconds, and the test (install and query installed chaincode) then takes about 17 seconds. A big difference is that the network deployment has no Go dependencies so it makes it much easier to avoid using core Fabric and fabric-protos-go dependencies and should allow us to migrate all the chaincode lifecycle code to use fabric-protos-go-apiv2.

SamYuan1990 commented 1 year ago

@SamYuan1990 Let me know what you think about the approach taken in this PR of using Microfab to stand up a Fabric network for integration testing of chaincode lifecycle. Most of the time is taken downloading Docker images and Go dependencies. Standing up the Fabric network looks to take around 3 seconds, and the test (install and query installed chaincode) then takes about 17 seconds. A big difference is that the network deployment has no Go dependencies so it makes it much easier to avoid using core Fabric and fabric-protos-go dependencies and should allow us to migrate all the chaincode lifecycle code to use fabric-protos-go-apiv2.

In general, I would like to use anything fast and stable as test infrastructure. but does it mean the Microfab just able to test with chaincode lifecycle? how about channel creation and update?

I just wondering if we can use Microfab replace for test network at end to end test case?

bestbeforetoday commented 1 year ago

In general, I would like to use anything fast and stable as test infrastructure. but does it mean the Microfab just able to test with chaincode lifecycle? how about channel creation and update?

I just wondering if we can use Microfab replace for test network at end to end test case?

I haven't tried creating new channels using Microfab, but it's a real Fabric deployment so it seems like it should be possible.

@mbwhite do you know if it's possible to create new channels and join peers to channels after the network is established using Microfab?

mbwhite commented 1 year ago

@bestbeforetoday yes in theory it should be possible; I've not tried it but assuming all the required information is in the correct places I can't see why it shouldn't work.

I'm 'updating' things at the moment to take advantaged of TLS - would be good to try this next.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

bestbeforetoday commented 1 year ago

This prototype is out of step with current code base so closing. We can revisit this as a potential testing approach later.