Skip to content

Commit

Permalink
[FAB-3565]: Add behave functionality for FAB-3505
Browse files Browse the repository at this point in the history
This adds functionality for executing steps in
the example02 stopping/starting feature test.

Change-Id: I6851e1422dc136e9db7d6e299454f702b21d36f3
Signed-off-by: Latitia M Haskins <[email protected]>
  • Loading branch information
lhaskins committed Jun 20, 2017
1 parent 1ee6eed commit 53818e7
Show file tree
Hide file tree
Showing 11 changed files with 333 additions and 111 deletions.
17 changes: 14 additions & 3 deletions test/feature/configs/configtx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Profiles:
Orderer:
<<: *OrdererDefaults
OrdererType: kafka
Addresses:
- orderer0.example.com:7050
- orderer1.example.com:7050
- orderer2.example.com:7050
Organizations:
- *ExampleCom
Application:
Expand Down Expand Up @@ -80,6 +84,7 @@ Profiles:
SysTestChannel:
Consortium: SampleConsortium
Application:
<<: *ApplicationDefaults
Organizations:
- *Org1ExampleCom
- *Org2ExampleCom
Expand Down Expand Up @@ -109,7 +114,7 @@ Organizations:
Name: Organization1
ID: Org1
MSPDir: ./peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp
AdminPrincipal: Role.MEMBER
AdminPrincipal: Role.ADMIN
AnchorPeers:
- Host: peer0.org1.example.com
Port: 7051
Expand All @@ -126,12 +131,14 @@ Organizations:
- &ExampleCom
Name: ExampleCom
ID: example.com
AdminPrincipal: Role.ADMIN
MSPDir: ./ordererOrganizations/example.com/msp

- &Org1ExampleCom
Name: Org1ExampleCom
ID: org1.example.com
MSPDir: ./peerOrganizations/org1.example.com/msp
AdminPrincipal: Role.ADMIN
AnchorPeers:
- Host: peer0.org1.example.com
Port: 7051
Expand All @@ -140,6 +147,7 @@ Organizations:
Name: Org2ExampleCom
ID: org2.example.com
MSPDir: ./peerOrganizations/org2.example.com/msp
AdminPrincipal: Role.ADMIN
AnchorPeers:
- Host: peer0.org2.example.com
Port: 7051
Expand All @@ -159,7 +167,7 @@ Orderer: &OrdererDefaults
OrdererType: solo

Addresses:
- orderer.example.com:7050
- orderer0.example.com:7050

# Batch Timeout: The amount of time to wait before creating a batch.
BatchTimeout: 2s
Expand Down Expand Up @@ -191,7 +199,10 @@ Orderer: &OrdererDefaults
# Brokers: A list of Kafka brokers to which the orderer connects.
# NOTE: Use IP:port notation
Brokers:
- 127.0.0.1:9092
- kafka0:9092
- kafka1:9092
- kafka2:9092
- kafka3:9092

# Organizations is the list of orgs which are defined as participants on
# the orderer side of the network.
Expand Down
4 changes: 3 additions & 1 deletion test/feature/configs/crypto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ OrdererOrgs:
- Name: ExampleCom
Domain: example.com
Specs:
- Hostname: orderer
- Hostname: orderer0
- Hostname: orderer1
- Hostname: orderer2

PeerOrgs:
- Name: Org1ExampleCom
Expand Down
144 changes: 131 additions & 13 deletions test/feature/docker-compose/docker-compose-kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ services:
image: hyperledger/fabric-kafka
container_name: kafka0
environment:
- KAFKA_LOG_RETENTION_MS=-1
- KAFKA_MESSAGE_MAX_BYTES=103809024
- KAFKA_REPLICA_FETCH_MAX_BYTES=103809024
- KAFKA_BROKER_ID=0
Expand All @@ -85,6 +86,7 @@ services:
image: hyperledger/fabric-kafka
container_name: kafka1
environment:
- KAFKA_LOG_RETENTION_MS=-1
- KAFKA_MESSAGE_MAX_BYTES=103809024
- KAFKA_REPLICA_FETCH_MAX_BYTES=103809024
- KAFKA_BROKER_ID=1
Expand All @@ -111,6 +113,7 @@ services:
image: hyperledger/fabric-kafka
container_name: kafka2
environment:
- KAFKA_LOG_RETENTION_MS=-1
- KAFKA_MESSAGE_MAX_BYTES=103809024
- KAFKA_REPLICA_FETCH_MAX_BYTES=103809024
- KAFKA_BROKER_ID=2
Expand All @@ -137,6 +140,7 @@ services:
image: hyperledger/fabric-kafka
container_name: kafka3
environment:
- KAFKA_LOG_RETENTION_MS=-1
- KAFKA_MESSAGE_MAX_BYTES=103809024
- KAFKA_REPLICA_FETCH_MAX_BYTES=103809024
- KAFKA_BROKER_ID=3
Expand All @@ -159,8 +163,8 @@ services:
aliases:
- ${CORE_PEER_NETWORKID}

orderer.example.com:
container_name: orderer.example.com
orderer0.example.com:
container_name: orderer0.example.com
image: hyperledger/fabric-orderer
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
Expand All @@ -186,8 +190,104 @@ services:
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/tls/ca.crt]
volumes:
- ../configs/${CORE_PEER_NETWORKID}:/var/hyperledger/configs
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/msp
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer.example.com/tls:/var/hyperledger/tls
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer0.example.com/msp:/var/hyperledger/msp
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer0.example.com/tls:/var/hyperledger/tls
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
- '7050'
depends_on:
- kafka0
- kafka1
- kafka2
- kafka3
links:
- kafka0:kafka0
- kafka1:kafka1
- kafka2:kafka2
- kafka3:kafka3
networks:
default:
aliases:
- ${CORE_PEER_NETWORKID}

orderer1.example.com:
container_name: orderer1.example.com
image: hyperledger/fabric-orderer
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/msp
- ORDERER_GENERAL_LOCALMSPID=example.com
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- CONFIGTX_ORDERER_ORDERERTYPE=kafka
- CONFIGTX_ORDERER_KAFKA_BROKERS=[kafka0:9092,kafka1:9092,kafka2:9092,kafka3:9092]
- ORDERER_KAFKA_RETRY_SHORTINTERVAL=1s
- ORDERER_KAFKA_RETRY_SHORTTOTAL=30s
- ORDERER_KAFKA_VERBOSE=true
- CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
- ORDERER_GENERAL_LEDGERTYPE=ram
- ORDERER_GENERAL_GENESISPROFILE=SampleInsecureKafka
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/configs/orderer.block
# TLS settings
- ORDERER_GENERAL_TLS_ENABLED=false
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/tls/ca.crt]
volumes:
- ../configs/${CORE_PEER_NETWORKID}:/var/hyperledger/configs
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer1.example.com/msp:/var/hyperledger/msp
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer1.example.com/tls:/var/hyperledger/tls
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
- '7050'
depends_on:
- kafka0
- kafka1
- kafka2
- kafka3
links:
- kafka0:kafka0
- kafka1:kafka1
- kafka2:kafka2
- kafka3:kafka3
networks:
default:
aliases:
- ${CORE_PEER_NETWORKID}

orderer2.example.com:
container_name: orderer2.example.com
image: hyperledger/fabric-orderer
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
- CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${CORE_PEER_NETWORKID}_default
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/msp
- ORDERER_GENERAL_LOCALMSPID=example.com
- ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
- ORDERER_GENERAL_LISTENPORT=7050
- CONFIGTX_ORDERER_ORDERERTYPE=kafka
- CONFIGTX_ORDERER_KAFKA_BROKERS=[kafka0:9092,kafka1:9092,kafka2:9092,kafka3:9092]
- ORDERER_KAFKA_RETRY_SHORTINTERVAL=1s
- ORDERER_KAFKA_RETRY_SHORTTOTAL=30s
- ORDERER_KAFKA_VERBOSE=true
- CONFIGTX_ORDERER_ADDRESSES=[127.0.0.1:7050]
- ORDERER_GENERAL_LEDGERTYPE=ram
- ORDERER_GENERAL_GENESISPROFILE=SampleInsecureKafka
- ORDERER_GENERAL_GENESISMETHOD=file
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/configs/orderer.block
# TLS settings
- ORDERER_GENERAL_TLS_ENABLED=false
- ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/tls/server.key
- ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/tls/server.crt
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/tls/ca.crt]
volumes:
- ../configs/${CORE_PEER_NETWORKID}:/var/hyperledger/configs
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer2.example.com/msp:/var/hyperledger/msp
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer2.example.com/tls:/var/hyperledger/tls
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
Expand Down Expand Up @@ -240,9 +340,13 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
links:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
command: peer node start
networks:
default:
Expand Down Expand Up @@ -282,9 +386,13 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
links:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
command: peer node start
networks:
default:
Expand Down Expand Up @@ -324,10 +432,14 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
- peer0.org1.example.com
links:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
command: peer node start
networks:
default:
Expand Down Expand Up @@ -367,10 +479,14 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
- peer0.org2.example.com
links:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
command: peer node start
networks:
default:
Expand Down Expand Up @@ -400,7 +516,9 @@ services:
ports:
- '9092'
depends_on:
- orderer.example.com
- orderer0.example.com
- orderer1.example.com
- orderer2.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
Expand Down
26 changes: 13 additions & 13 deletions test/feature/docker-compose/docker-compose-solo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ networks:

services:

orderer.example.com:
container_name: orderer.example.com
orderer0.example.com:
container_name: orderer0.example.com
image: hyperledger/fabric-orderer
environment:
- ORDERER_GENERAL_LOGLEVEL=debug
Expand All @@ -29,8 +29,8 @@ services:
- ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/tls/ca.crt]
volumes:
- ../configs/${CORE_PEER_NETWORKID}:/var/hyperledger/configs
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer.example.com/msp:/var/hyperledger/msp
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer.example.com/tls:/var/hyperledger/tls
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer0.example.com/msp:/var/hyperledger/msp
- ../configs/${CORE_PEER_NETWORKID}/ordererOrganizations/example.com/orderers/orderer0.example.com/tls:/var/hyperledger/tls
working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer
command: orderer
ports:
Expand Down Expand Up @@ -73,9 +73,9 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
links:
- orderer.example.com
- orderer0.example.com
command: peer node start
networks:
default:
Expand Down Expand Up @@ -115,10 +115,10 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
- peer0.org1.example.com
links:
- orderer.example.com
- orderer0.example.com
command: peer node start
networks:
default:
Expand Down Expand Up @@ -157,10 +157,10 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
- peer0.org1.example.com
links:
- orderer.example.com
- orderer0.example.com
command: peer node start
networks:
default:
Expand Down Expand Up @@ -199,10 +199,10 @@ services:
- '7051'
- '7053'
depends_on:
- orderer.example.com
- orderer0.example.com
- peer0.org2.example.com
links:
- orderer.example.com
- orderer0.example.com
command: peer node start
networks:
default:
Expand All @@ -229,7 +229,7 @@ services:
- ../configs:/var/hyperledger/configs
- ../configs/${CORE_PEER_NETWORKID}/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/var/hyperledger/tls
depends_on:
- orderer.example.com
- orderer0.example.com
- peer0.org1.example.com
- peer1.org1.example.com
- peer0.org2.example.com
Expand Down
Loading

0 comments on commit 53818e7

Please sign in to comment.