hyperledger / fabric-admin-sdk

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

Test coverage #68

Open SamYuan1990 opened 1 year ago

SamYuan1990 commented 1 year ago

Is your proposal related to a problem?

we have some packages without test case or test coverage is less than 50%

(Write your answer here.)

Describe the solution you'd like

we hope improve code quality by unit test case.

(Describe your proposed solution here.)

Describe alternatives you've considered

(Write your answer here.)

Additional context

(Write your answer here.)

SamYuan1990 commented 1 year ago
?       github.com/hyperledger/fabric-admin-sdk/internal/channelconfig  [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/configtxgen/encoder    [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/configtxgen/encoder/fakes      [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/configtxgen/genesisconfig      [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/configtxgen/metadata   [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/configtxgen/viperutil  [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/configtxlator/update   [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/gateway        [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/genesis        [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/msp    [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/network        [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/osnadmin       [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/pkg/identity   [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/policies       [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/policydsl      [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/proposal       [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/protoutil      [no test files]
?       github.com/hyperledger/fabric-admin-sdk/internal/util   [no test files]

test case needed for packages above.

SamYuan1990 commented 1 year ago
ok      github.com/hyperledger/fabric-admin-sdk/pkg/channel     0.469s  coverage: 0.0% of statements
bestbeforetoday commented 1 year ago

Be careful of looking at packages in isolation. Some of the packages listed above as containing no test files are used (and covered) by unit tests in other packages that make use of them.

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.