Skip to content

Commit

Permalink
Fix test network bugs for adding org3
Browse files Browse the repository at this point in the history
Signed-off-by: NIKHIL E GUPTA <negupta@us.ibm.com>
  • Loading branch information
NIKHIL E GUPTA committed Dec 12, 2019
1 parent 66ac1ad commit 73267e1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 19 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function printHelp () {
echo "Typically, one would first generate the required certificates and "
echo "genesis block, then bring up the network. e.g.:"
echo
echo " eyfn.sh generate"
echo " addOrg3.sh generate"
echo " addOrg3.sh up -c mychannel -s couchdb"
echo " addOrg3.sh up -l node"
echo " addOrg3.sh down -c mychannel"
Expand Down Expand Up @@ -175,22 +175,10 @@ IMAGETAG="latest"
DATABASE="leveldb"

# Parse commandline args
if [ "$1" = "-m" ];then # supports old usage, muscle memory is powerful!
shift
fi
MODE=$1;shift
# Determine whether starting, stopping, restarting or generating for announce
if [ "$MODE" == "up" ]; then
echo ="Add org3 to channel '${CHANNEL_NAME}' with '${CLI_TIMEOUT}' seconds and CLI delay of '${CLI_DELAY}' seconds and using database '${DATABASE}'"
echo
elif [ "$MODE" == "down" ]; then
EXPMODE="Stopping network"
elif [ "$MODE" == "generate" ]; then
EXPMODE="Generating certs and organization definition for Org3"
else
printHelp
exit 1
fi

MODE=$1;
shift

while getopts "h?c:t:d:f:s:l:i:v" opt; do
case "$opt" in
h|\?)
Expand All @@ -214,6 +202,19 @@ while getopts "h?c:t:d:f:s:l:i:v" opt; do
esac
done

# Determine whether starting, stopping, restarting or generating for announce
if [ "$MODE" == "up" ]; then
echo "Add Org3 to channel '${CHANNEL_NAME}' with '${CLI_TIMEOUT}' seconds and CLI delay of '${CLI_DELAY}' seconds and using database '${DATABASE}'"
echo
elif [ "$MODE" == "down" ]; then
EXPMODE="Stopping network"
elif [ "$MODE" == "generate" ]; then
EXPMODE="Generating certs and organization definition for Org3"
else
printHelp
exit 1
fi

#Create the network using docker compose
if [ "${MODE}" == "up" ]; then
networkUp
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions test-network/network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ COMPOSE_FILE_COUCH=docker/docker-compose-couch.yaml
# certificate authorities compose file
COMPOSE_FILE_CA=docker/docker-compose-ca.yaml
# use this as the docker compose couch file for org3
COMPOSE_FILE_COUCH_ORG3=add-org3/docker/docker-compose-couch-org3.yaml
COMPOSE_FILE_COUCH_ORG3=addOrg3/docker/docker-compose-couch-org3.yaml
# use this as the default docker-compose yaml definition for org3
COMPOSE_FILE_ORG3=add-org3/docker/docker-compose-org3.yaml
COMPOSE_FILE_ORG3=addOrg3/docker/docker-compose-org3.yaml
#
# use golang as the default language for chaincode
CC_RUNTIME_LANGUAGE=golang
Expand Down

0 comments on commit 73267e1

Please sign in to comment.