1 Star 0 Fork 0

朱学润 / fabric-ca

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.15 KB
一键复制 编辑 原始数据 按行查看 历史

Fabric CA FVT tests for Continuous Integration

Building the test image

The tests scripts that will run are in scripts/fvt.

From the repository root, issue make docker-fvt to generate the docker test image. To remove build artifacts of the docker fvt test image, run make docker-clean.

Running the fvt tests

Once the test image is successfully built, execute

docker run -v $PWD:/opt/gopath/src/github.com/hyperledger/fabric-ca hyperledger/fabric-ca-fvt

By default, the resulting container will run scripts/run_fvt_tests in the environment provided by the hyperledger/fabric-ca-fvt docker image. Output will go to the terminal.

Interacting with the test container

To start a command-line instance of the test container without automatically running the tests, issue

docker run -v $PWD:/opt/gopath/src/github.com/hyperledger/fabric-ca -ti hyperledger/fabric-ca-fvt bash

This mounts the source code from the host into the container. You can make any changes you want, then manually issue make fvt-tests from inside the container.

Running All Tests

To execute all of the tests that will run in CI, issue

make all-tests fvt-tests

This will build a docker-fvt test image and run all of the unit tests, integration tests, and fvt tests.

Creating tests

You may add additional tests (essentially any scripts or executables, in any language, that generates a return code and follows the naming convention *test.sh) by placing them in the scripts/fvt directory. You may invoke them directly within an interactive test container, or rely on the image's default command run all of the fvt tests. Note that each test in the fvt directory will be run twice: once using TLS and once without using TLS. Consequently, the tests should be written to run in either environment.

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

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhuxuerun/fabric-ca.git
git@gitee.com:zhuxuerun/fabric-ca.git
zhuxuerun
fabric-ca
fabric-ca
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891