Skip to content

Commit

Permalink
Migrate Fabric integration tests to test network (#1410)
Browse files Browse the repository at this point in the history
* Migrate Fabric integration tests to test network

Signed-off-by: CaptainIRS <[email protected]>

* Address review comments

* Get rid of `rm -fr /tmp/hfc-*`
* Merge redundant phases
* Upgrade SUT version in docker tests
* Remove unnecessary connection profiles
* Made `discover = true`

Signed-off-by: CaptainIRS <[email protected]>

* Address review comments

* Add connection profiles wherever needed

Signed-off-by: CaptainIRS <[email protected]>
  • Loading branch information
CaptainIRS authored Jul 20, 2022
1 parent 8a792e0 commit 5025d20
Show file tree
Hide file tree
Showing 65 changed files with 434 additions and 2,396 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
report.html
node_modules/*
package-lock.json
fabric-samples
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ caliper:
benchconfig: ./benchconfig.yaml
networkconfig: ./networkconfig.yaml
bind:
sut: fabric:1.4.1
sut: fabric:2.4
report:
path: ./report.html
logging:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,50 +28,42 @@ organizations:
- peer0.org1.example.com

orderers:
orderer0.example.com:
url: grpcs://localhost:7050
orderer.example.com:
url: grpcs://orderer.example.com:7050
grpcOptions:
ssl-target-name-override: orderer0.example.com
ssl-target-name-override: orderer.example.com
tlsCACerts:
path: ./config/crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
orderer1.example.com:
url: grpcs://localhost:8050
grpcOptions:
ssl-target-name-override: orderer1.example.com
tlsCACerts:
path: ./config/crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
path: ./fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

peers:
peer0.org1.example.com:
url: grpcs://localhost:7051
url: grpcs://peer0.org1.example.com:7051
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
grpc.keepalive_time_ms: 600000
tlsCACerts:
path: ./config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem
path: ./fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

peer0.org2.example.com:
url: grpcs://localhost:8051
url: grpcs://peer0.org2.example.com:9051
grpcOptions:
ssl-target-name-override: peer0.org2.example.com
grpc.keepalive_time_ms: 600000
tlsCACerts:
path: ./config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem
path: ./fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem

channels:
mychannel:
orderers:
- orderer0.example.com
- orderer1.example.com
- orderer.example.com
peers:
peer0.org1.example.com:
eventSource: true
peer0.org2.example.com:
eventSource: true
yourchannel:
orderers:
- orderer0.example.com
- orderer1.example.com
- orderer.example.com
peers:
peer0.org1.example.com:
eventSource: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,50 +28,42 @@ organizations:
- peer0.org2.example.com

orderers:
orderer0.example.com:
url: grpcs://localhost:7050
orderer.example.com:
url: grpcs://orderer.example.com:7050
grpcOptions:
ssl-target-name-override: orderer0.example.com
ssl-target-name-override: orderer.example.com
tlsCACerts:
path: ./config/crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
orderer1.example.com:
url: grpcs://localhost:8050
grpcOptions:
ssl-target-name-override: orderer1.example.com
tlsCACerts:
path: ./config/crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
path: ./fabric-samples/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem

peers:
peer0.org1.example.com:
url: grpcs://localhost:7051
url: grpcs://peer0.org1.example.com:7051
grpcOptions:
ssl-target-name-override: peer0.org1.example.com
grpc.keepalive_time_ms: 600000
tlsCACerts:
path: ./config/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem
path: ./fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem

peer0.org2.example.com:
url: grpcs://localhost:8051
url: grpcs://peer0.org2.example.com:9051
grpcOptions:
ssl-target-name-override: peer0.org2.example.com
grpc.keepalive_time_ms: 600000
tlsCACerts:
path: ./config/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem
path: ./fabric-samples/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem

channels:
mychannel:
orderers:
- orderer0.example.com
- orderer1.example.com
- orderer.example.com
peers:
peer0.org1.example.com:
eventSource: true
peer0.org2.example.com:
eventSource: true
yourchannel:
orderers:
- orderer0.example.com
- orderer1.example.com
- orderer.example.com
peers:
peer0.org1.example.com:
eventSource: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@
# Print all commands.
set -v

# Grab the parent (fabric_tests) directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TEST_NETWORK_DIR=${DIR}/fabric-samples/test-network

cd ${DIR}

docker-compose -p caliper down
(test -z \"$(docker ps -aq)\") || docker rm $(docker ps -aq)
(test -z \"$(docker images dev* -q)\") || docker rmi $(docker images dev* -q)

pushd ${TEST_NETWORK_DIR}
./network.sh down
popd

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5025d20

Please sign in to comment.