Simplify Fabric-sdk-go test cases

The test cases indicated in the Fabric-sdk-go document are: make unit-test and make integration-test. These test cases take a long time to check and configure the environment, and these checks are repeated for each test. Simplify these test cases to speed up the test progress.
1. Simplify unit-test
Find unit-test in Makefile, use # to cancel the dependency of unit-test.
Insert picture description here
Execute make crypto-gen to generate the organization's digital certificate based on cryptogen.yaml. The location of the file is shown below.
Insert picture description here
Insert picture description here
Execute make channel-config-gen to generate genesis block, channel and other environments. The configuration file used is configtx.yaml.
Insert picture description here
Execute make unit-test, skip many checks and configurations, and directly call the unit.sh script.
Insert picture description here
2. Simplify integration-test
Find integration-test in Makefile, use # to cancel the dependency of integration-test.
Insert picture description here
integration-test can call multiple versions of integration tests, such as integration-tests-stable. Find integration-tests-stable in the Makefile, and use # to cancel the dependency of integration-tests-stable.
Insert picture description here
If make crypto-gen and make channel-config-gen are not executed, then execute and generate environment and configuration.
Execute make integration-test, then many checks and downloads will be skipped, and the progress will be accelerated.

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_18807043/article/details/105652526