1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/hyperledger-fabric

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
CONTRIBUTING.md 1.7 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
semil Отправлено 04.06.2023 10:26 380dfe5

Contributing

We welcome contributions to the Hyperledger Fabric Project in many forms, and there's always plenty to do!

Please visit the contributors guide in the docs to learn how to make contributions to this exciting project.

Running Unit tests

An example of using the script as used in the CI pipeline to run Unit Tests

TEST_PKGS=github.com/hyperledger/fabric/core/chaincode/... ./scripts/run-unit-tests.sh

Creating the mocks for unit tests

A number of mock implementations of interfaces are used within the unit tests. For historical reasons there are two tools with the repo to generate these mocks. mockery and counterfeiter

  • look in the already created mock - the first line will indicate which tool it was created with

  • for counterfieter, run go generate ./<dir>/... in the

    where you want the mocks directory to be created
  • for mockery the command is mockery --name ApplicationCapabilities --dir ~/github.com/hyperledger/fabric/common/channelconfig --filename application_capabilities.go

    • this will create the mock with the filename given in the mocks directory based of the cwd
    • the --name and --dir indicate where the 'source' interface is to be mocked

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/hyperledger-fabric.git
git@api.gitlife.ru:oschina-mirror/hyperledger-fabric.git
oschina-mirror
hyperledger-fabric
hyperledger-fabric
main