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
.
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.
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.
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.
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.
This work is licensed under a Creative Commons Attribution 4.0 International License.