-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUILD] Run unit-tests within docker
We create a new docker container "testenv" and use this to execute unit tests. We will add support for running other aspects of the build (linter, protoc, behave) later in the series. Change-Id: Ic6cf20a5cd04b412e6bd786b6f13809fef413677 Signed-off-by: Greg Haskins <gregory.haskins@gmail.com>
- Loading branch information
Showing
4 changed files
with
50 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM hyperledger/fabric-baseimage:_BASE_TAG_ | ||
ADD payload/gotools.tar.bz2 /usr/local/bin/ | ||
WORKDIR /opt/gopath/src/github.com/hyperledger/fabric |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
vp: | ||
image: hyperledger/fabric-peer | ||
expose: | ||
- 7051 | ||
environment: | ||
- CORE_PEER_ADDRESSAUTODETECT=true | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
unit-tests: | ||
image: hyperledger/fabric-testenv | ||
links: | ||
- vp | ||
environment: | ||
- UNIT_TEST_PEER_IP=vp | ||
- GO_LDFLAGS | ||
- OUTPUT | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
- ${GOPATH}/src/github.com/hyperledger/fabric:/opt/gopath/src/github.com/hyperledger/fabric | ||
command: ./unit-test/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters