[FAB-12219] abstore node -> javascript

Rename the abstore node directory as the sample code
within is JavaScript, and we are planning to add a
TypeScript version as well.

This change also requires updates to BYFN to reflect
the renamed directory.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: I1cd554c6598ac7cc71e2b0c65ab541cfaa477354
This commit is contained in:
Simon Stone 2019-08-02 10:23:09 +01:00
parent 14ac271c63
commit 3996db59dc
13 changed files with 108 additions and 72 deletions

View file

@ -47,7 +47,7 @@ function printHelp() {
echo " -d <delay> - delay duration in seconds (defaults to 3)" echo " -d <delay> - delay duration in seconds (defaults to 3)"
echo " -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)" echo " -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)"
echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb" echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb"
echo " -l <language> - the chaincode language: golang (default) or node" echo " -l <language> - the programming language of the chaincode to deploy: go (default), javascript, or java"
echo " -o <consensus-type> - the consensus-type of the ordering service: solo (default), kafka, or etcdraft" echo " -o <consensus-type> - the consensus-type of the ordering service: solo (default), kafka, or etcdraft"
echo " -i <imagetag> - the tag to be used to launch the network (defaults to \"latest\")" echo " -i <imagetag> - the tag to be used to launch the network (defaults to \"latest\")"
echo " -a - launch certificate authorities (no certificate authorities are launched by default)" echo " -a - launch certificate authorities (no certificate authorities are launched by default)"
@ -61,7 +61,7 @@ function printHelp() {
echo " byfn.sh generate -c mychannel" echo " byfn.sh generate -c mychannel"
echo " byfn.sh up -c mychannel -s couchdb" echo " byfn.sh up -c mychannel -s couchdb"
echo " byfn.sh up -c mychannel -s couchdb -i 1.4.0" echo " byfn.sh up -c mychannel -s couchdb -i 1.4.0"
echo " byfn.sh up -l node" echo " byfn.sh up -l javascript"
echo " byfn.sh down -c mychannel" echo " byfn.sh down -c mychannel"
echo " byfn.sh upgrade -c mychannel" echo " byfn.sh upgrade -c mychannel"
echo echo
@ -192,7 +192,7 @@ function networkUp() {
fi fi
# now run the end to end script # now run the end to end script
docker exec cli scripts/script.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE $NO_CHAINCODE docker exec cli scripts/script.sh $CHANNEL_NAME $CLI_DELAY $CC_SRC_LANGUAGE $CLI_TIMEOUT $VERBOSE $NO_CHAINCODE
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR !!!! Test failed" echo "ERROR !!!! Test failed"
exit 1 exit 1
@ -261,7 +261,7 @@ function upgradeNetwork() {
docker-compose $COMPOSE_FILES up -d --no-deps $PEER docker-compose $COMPOSE_FILES up -d --no-deps $PEER
done done
docker exec cli scripts/upgrade_to_v14.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE docker exec cli scripts/upgrade_to_v14.sh $CHANNEL_NAME $CLI_DELAY $CC_SRC_LANGUAGE $CLI_TIMEOUT $VERBOSE
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR !!!! Test failed" echo "ERROR !!!! Test failed"
exit 1 exit 1
@ -502,8 +502,8 @@ COMPOSE_FILE_RAFT2=docker-compose-etcdraft2.yaml
# certificate authorities compose file # certificate authorities compose file
COMPOSE_FILE_CA=docker-compose-ca.yaml COMPOSE_FILE_CA=docker-compose-ca.yaml
# #
# use golang as the default language for chaincode # use go as the default language for chaincode
LANGUAGE=golang CC_SRC_LANGUAGE=go
# default image tag # default image tag
IMAGETAG="latest" IMAGETAG="latest"
# default consensus type # default consensus type
@ -552,7 +552,7 @@ while getopts "h?c:t:d:f:s:l:i:o:anv" opt; do
IF_COUCHDB=$OPTARG IF_COUCHDB=$OPTARG
;; ;;
l) l)
LANGUAGE=$OPTARG CC_SRC_LANGUAGE=$OPTARG
;; ;;
i) i)
IMAGETAG=$(go env GOARCH)"-"$OPTARG IMAGETAG=$(go env GOARCH)"-"$OPTARG

View file

@ -31,7 +31,7 @@ function printHelp () {
echo " -d <delay> - delay duration in seconds (defaults to 3)" echo " -d <delay> - delay duration in seconds (defaults to 3)"
echo " -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)" echo " -f <docker-compose-file> - specify which docker-compose file use (defaults to docker-compose-cli.yaml)"
echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb" echo " -s <dbtype> - the database backend to use: goleveldb (default) or couchdb"
echo " -l <language> - the chaincode language: golang (default) or node" echo " -l <language> - the programming language of the chaincode to deploy: go (default), javascript, or java"
echo " -i <imagetag> - the tag to be used to launch the network (defaults to \"latest\")" echo " -i <imagetag> - the tag to be used to launch the network (defaults to \"latest\")"
echo " -v - verbose mode" echo " -v - verbose mode"
echo echo
@ -40,7 +40,7 @@ function printHelp () {
echo echo
echo " eyfn.sh generate -c mychannel" echo " eyfn.sh generate -c mychannel"
echo " eyfn.sh up -c mychannel -s couchdb" echo " eyfn.sh up -c mychannel -s couchdb"
echo " eyfn.sh up -l node" echo " eyfn.sh up -l javascript"
echo " eyfn.sh down -c mychannel" echo " eyfn.sh down -c mychannel"
echo echo
echo "Taking all defaults:" echo "Taking all defaults:"
@ -112,13 +112,13 @@ function networkUp () {
echo "###############################################################" echo "###############################################################"
echo "############### Have Org3 peers join network ##################" echo "############### Have Org3 peers join network ##################"
echo "###############################################################" echo "###############################################################"
docker exec Org3cli ./scripts/step2org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE docker exec Org3cli ./scripts/step2org3.sh $CHANNEL_NAME $CLI_DELAY $CC_SRC_LANGUAGE $CLI_TIMEOUT $VERBOSE
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR !!!! Unable to have Org3 peers join network" echo "ERROR !!!! Unable to have Org3 peers join network"
exit 1 exit 1
fi fi
# finish by running the test # finish by running the test
docker exec Org3cli ./scripts/testorg3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE docker exec Org3cli ./scripts/testorg3.sh $CHANNEL_NAME $CLI_DELAY $CC_SRC_LANGUAGE $CLI_TIMEOUT $VERBOSE
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR !!!! Unable to run test" echo "ERROR !!!! Unable to run test"
exit 1 exit 1
@ -148,7 +148,7 @@ function createConfigTx () {
echo "###############################################################" echo "###############################################################"
echo "####### Generate and submit config tx to add Org3 #############" echo "####### Generate and submit config tx to add Org3 #############"
echo "###############################################################" echo "###############################################################"
docker exec cli scripts/step1org3.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE docker exec cli scripts/step1org3.sh $CHANNEL_NAME $CLI_DELAY $CC_SRC_LANGUAGE $CLI_TIMEOUT $VERBOSE
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "ERROR !!!! Unable to create config tx" echo "ERROR !!!! Unable to create config tx"
exit 1 exit 1
@ -237,8 +237,8 @@ COMPOSE_FILE_COUCH_ORG3=docker-compose-couch-org3.yaml
COMPOSE_FILE_KAFKA=docker-compose-kafka.yaml COMPOSE_FILE_KAFKA=docker-compose-kafka.yaml
# two additional etcd/raft orderers # two additional etcd/raft orderers
COMPOSE_FILE_RAFT2=docker-compose-etcdraft2.yaml COMPOSE_FILE_RAFT2=docker-compose-etcdraft2.yaml
# use golang as the default language for chaincode # use go as the default language for chaincode
LANGUAGE=golang CC_SRC_LANGUAGE=go
# default image tag # default image tag
IMAGETAG="latest" IMAGETAG="latest"
@ -276,7 +276,7 @@ while getopts "h?c:t:d:f:s:l:i:v" opt; do
;; ;;
s) IF_COUCHDB=$OPTARG s) IF_COUCHDB=$OPTARG
;; ;;
l) LANGUAGE=$OPTARG l) CC_SRC_LANGUAGE=$OPTARG
;; ;;
i) IMAGETAG=$OPTARG i) IMAGETAG=$OPTARG
;; ;;

View file

@ -11,29 +11,37 @@ echo "Build your first network (BYFN) end-to-end test"
echo echo
CHANNEL_NAME="$1" CHANNEL_NAME="$1"
DELAY="$2" DELAY="$2"
LANGUAGE="$3" CC_SRC_LANGUAGE="$3"
TIMEOUT="$4" TIMEOUT="$4"
VERBOSE="$5" VERBOSE="$5"
NO_CHAINCODE="$6" NO_CHAINCODE="$6"
: ${CHANNEL_NAME:="mychannel"} : ${CHANNEL_NAME:="mychannel"}
: ${DELAY:="3"} : ${DELAY:="3"}
: ${LANGUAGE:="golang"} : ${CC_SRC_LANGUAGE:="go"}
: ${TIMEOUT:="10"} : ${TIMEOUT:="10"}
: ${VERBOSE:="false"} : ${VERBOSE:="false"}
: ${NO_CHAINCODE:="false"} : ${NO_CHAINCODE:="false"}
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]` CC_SRC_LANGUAGE=`echo "$CC_SRC_LANGUAGE" | tr [:upper:] [:lower:]`
COUNTER=1 COUNTER=1
MAX_RETRY=20 MAX_RETRY=20
PACKAGE_ID="" PACKAGE_ID=""
if [ "$LANGUAGE" = "node" ]; then if [ "$CC_SRC_LANGUAGE" = "go" -o "$CC_SRC_LANGUAGE" = "golang" ]; then
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/node/" CC_RUNTIME_LANGUAGE=golang
elif [ "$LANGUAGE" = "java" ]; then CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/"
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/" elif [ "$CC_SRC_LANGUAGE" = "javascript" ]; then
CC_RUNTIME_LANGUAGE=node # chaincode runtime language is node.js
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/javascript/"
elif [ "$CC_SRC_LANGUAGE" = "java" ]; then
CC_RUNTIME_LANGUAGE=java
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/"
else else
CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/" echo The chaincode language ${CC_SRC_LANGUAGE} is not supported by this script
echo Supported chaincode languages are: go, javascript, java
exit 1
fi fi
echo "Channel name : "$CHANNEL_NAME echo "Channel name : "$CHANNEL_NAME
# import utils # import utils
@ -143,7 +151,7 @@ if [ "${NO_CHAINCODE}" != "true" ]; then
# Query on chaincode on peer1.org2, check if the result is 90 # Query on chaincode on peer1.org2, check if the result is 90
echo "Querying chaincode on peer1.org2..." echo "Querying chaincode on peer1.org2..."
chaincodeQuery 1 2 90 chaincodeQuery 1 2 90
fi fi
echo echo

View file

@ -13,24 +13,31 @@
CHANNEL_NAME="$1" CHANNEL_NAME="$1"
DELAY="$2" DELAY="$2"
LANGUAGE="$3" CC_SRC_LANGUAGE="$3"
TIMEOUT="$4" TIMEOUT="$4"
VERBOSE="$5" VERBOSE="$5"
: ${CHANNEL_NAME:="mychannel"} : ${CHANNEL_NAME:="mychannel"}
: ${DELAY:="3"} : ${DELAY:="3"}
: ${LANGUAGE:="golang"} : ${CC_SRC_LANGUAGE:="go"}
: ${TIMEOUT:="10"} : ${TIMEOUT:="10"}
: ${VERBOSE:="false"} : ${VERBOSE:="false"}
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]` CC_SRC_LANGUAGE=`echo "$CC_SRC_LANGUAGE" | tr [:upper:] [:lower:]`
COUNTER=1 COUNTER=1
MAX_RETRY=5 MAX_RETRY=5
if [ "$LANGUAGE" = "node" ]; then if [ "$CC_SRC_LANGUAGE" = "go" -o "$CC_SRC_LANGUAGE" = "golang" ]; then
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/node/" CC_RUNTIME_LANGUAGE=golang
elif [ "$LANGUAGE" = "java" ]; then CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/"
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/" elif [ "$CC_SRC_LANGUAGE" = "javascript" ]; then
CC_RUNTIME_LANGUAGE=node # chaincode runtime language is node.js
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/javascript/"
elif [ "$CC_SRC_LANGUAGE" = "java" ]; then
CC_RUNTIME_LANGUAGE=java
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/"
else else
CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/" echo The chaincode language ${CC_SRC_LANGUAGE} is not supported by this script
echo Supported chaincode languages are: go, javascript, java
exit 1
fi fi
# import utils # import utils

View file

@ -16,25 +16,32 @@ echo "========= Getting Org3 on to your first network ========= "
echo echo
CHANNEL_NAME="$1" CHANNEL_NAME="$1"
DELAY="$2" DELAY="$2"
LANGUAGE="$3" CC_SRC_LANGUAGE="$3"
TIMEOUT="$4" TIMEOUT="$4"
VERBOSE="$5" VERBOSE="$5"
: ${CHANNEL_NAME:="mychannel"} : ${CHANNEL_NAME:="mychannel"}
: ${DELAY:="3"} : ${DELAY:="3"}
: ${LANGUAGE:="golang"} : ${CC_SRC_LANGUAGE:="go"}
: ${TIMEOUT:="10"} : ${TIMEOUT:="10"}
: ${VERBOSE:="false"} : ${VERBOSE:="false"}
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]` CC_SRC_LANGUAGE=`echo "$CC_SRC_LANGUAGE" | tr [:upper:] [:lower:]`
COUNTER=1 COUNTER=1
MAX_RETRY=5 MAX_RETRY=5
PACKAGE_ID="" PACKAGE_ID=""
if [ "$LANGUAGE" = "node" ]; then if [ "$CC_SRC_LANGUAGE" = "go" -o "$CC_SRC_LANGUAGE" = "golang" ]; then
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/node/" CC_RUNTIME_LANGUAGE=golang
elif [ "$LANGUAGE" = "java" ]; then CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/"
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/" elif [ "$CC_SRC_LANGUAGE" = "javascript" ]; then
CC_RUNTIME_LANGUAGE=node # chaincode runtime language is node.js
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/javascript/"
elif [ "$CC_SRC_LANGUAGE" = "java" ]; then
CC_RUNTIME_LANGUAGE=java
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/"
else else
CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/" echo The chaincode language ${CC_SRC_LANGUAGE} is not supported by this script
echo Supported chaincode languages are: go, javascript, java
exit 1
fi fi
# import utils # import utils

View file

@ -22,23 +22,30 @@ echo "Extend your first network (EYFN) test"
echo echo
CHANNEL_NAME="$1" CHANNEL_NAME="$1"
DELAY="$2" DELAY="$2"
LANGUAGE="$3" CC_SRC_LANGUAGE="$3"
TIMEOUT="$4" TIMEOUT="$4"
VERBOSE="$5" VERBOSE="$5"
: ${CHANNEL_NAME:="mychannel"} : ${CHANNEL_NAME:="mychannel"}
: ${TIMEOUT:="10"} : ${TIMEOUT:="10"}
: ${LANGUAGE:="golang"} : ${CC_SRC_LANGUAGE:="go"}
: ${VERBOSE:="false"} : ${VERBOSE:="false"}
LANGUAGE=`echo "$LANGUAGE" | tr [:upper:] [:lower:]` CC_SRC_LANGUAGE=`echo "$CC_SRC_LANGUAGE" | tr [:upper:] [:lower:]`
COUNTER=1 COUNTER=1
MAX_RETRY=5 MAX_RETRY=5
if [ "$LANGUAGE" = "node" ]; then if [ "$CC_SRC_LANGUAGE" = "go" -o "$CC_SRC_LANGUAGE" = "golang" ]; then
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/node/" CC_RUNTIME_LANGUAGE=golang
elif [ "$LANGUAGE" = "java" ]; then CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/"
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/" elif [ "$CC_SRC_LANGUAGE" = "javascript" ]; then
CC_RUNTIME_LANGUAGE=node # chaincode runtime language is node.js
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/javascript/"
elif [ "$CC_SRC_LANGUAGE" = "java" ]; then
CC_RUNTIME_LANGUAGE=java
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/"
else else
CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/" echo The chaincode language ${CC_SRC_LANGUAGE} is not supported by this script
echo Supported chaincode languages are: go, javascript, java
exit 1
fi fi
echo "Channel name : "$CHANNEL_NAME echo "Channel name : "$CHANNEL_NAME

View file

@ -11,24 +11,31 @@ echo "Upgrade your first network (BYFN) from v1.3.x to v1.4.x end-to-end test"
echo echo
CHANNEL_NAME="$1" CHANNEL_NAME="$1"
DELAY="$2" DELAY="$2"
LANGUAGE="$3" CC_SRC_LANGUAGE="$3"
TIMEOUT="$4" TIMEOUT="$4"
VERBOSE="$5" VERBOSE="$5"
: ${CHANNEL_NAME:="mychannel"} : ${CHANNEL_NAME:="mychannel"}
: ${DELAY:="5"} : ${DELAY:="5"}
: ${LANGUAGE:="golang"} : ${CC_SRC_LANGUAGE:="go"}
: ${TIMEOUT:="10"} : ${TIMEOUT:="10"}
: ${VERBOSE:="false"} : ${VERBOSE:="false"}
LANGUAGE=$(echo "$LANGUAGE" | tr [:upper:] [:lower:]) CC_SRC_LANGUAGE=$(echo "$CC_SRC_LANGUAGE" | tr [:upper:] [:lower:])
COUNTER=1 COUNTER=1
MAX_RETRY=5 MAX_RETRY=5
if [ "$LANGUAGE" = "node" ]; then if [ "$CC_SRC_LANGUAGE" = "go" -o "$CC_SRC_LANGUAGE" = "golang" ]; then
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/node/" CC_RUNTIME_LANGUAGE=golang
elif [ "$LANGUAGE" = "java" ]; then CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/"
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/" elif [ "$CC_SRC_LANGUAGE" = "javascript" ]; then
CC_RUNTIME_LANGUAGE=node # chaincode runtime language is node.js
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/javascript/"
elif [ "$CC_SRC_LANGUAGE" = "java" ]; then
CC_RUNTIME_LANGUAGE=java
CC_SRC_PATH="/opt/gopath/src/github.com/hyperledger/fabric-samples/chaincode/abstore/java/"
else else
CC_SRC_PATH="github.com/hyperledger/fabric-samples/chaincode/abstore/go/" echo The chaincode language ${CC_SRC_LANGUAGE} is not supported by this script
echo Supported chaincode languages are: go, javascript, java
exit 1
fi fi
echo "Channel name : "$CHANNEL_NAME echo "Channel name : "$CHANNEL_NAME

View file

@ -120,7 +120,7 @@ packageChaincode() {
ORG=$3 ORG=$3
setGlobals $PEER $ORG setGlobals $PEER $ORG
set -x set -x
peer lifecycle chaincode package mycc.tar.gz --path ${CC_SRC_PATH} --lang ${LANGUAGE} --label mycc_${VERSION} >&log.txt peer lifecycle chaincode package mycc.tar.gz --path ${CC_SRC_PATH} --lang ${CC_RUNTIME_LANGUAGE} --label mycc_${VERSION} >&log.txt
res=$? res=$?
set +x set +x
cat log.txt cat log.txt

View file

@ -114,7 +114,7 @@ and run some invocations are provided below.
* Finally, comment out the `docker exec cli scripts/script.sh` command from the `byfn.sh` script by placing a `#` before it so that the standard BYFN end to end script doesn't run, e.g. * Finally, comment out the `docker exec cli scripts/script.sh` command from the `byfn.sh` script by placing a `#` before it so that the standard BYFN end to end script doesn't run, e.g.
`# docker exec cli scripts/script.sh $CHANNEL_NAME $CLI_DELAY $LANGUAGE $CLI_TIMEOUT $VERBOSE` `# docker exec cli scripts/script.sh $CHANNEL_NAME $CLI_DELAY $CC_SRC_LANGUAGE $CLI_TIMEOUT $VERBOSE`
3. We can now bring our network up by typing in `./byfn.sh up -c mychannel` 3. We can now bring our network up by typing in `./byfn.sh up -c mychannel`
4. Open a new terminal window and enter the CLI container using `docker exec -it cli bash`, all operations on the network will happen within 4. Open a new terminal window and enter the CLI container using `docker exec -it cli bash`, all operations on the network will happen within

View file

@ -88,25 +88,25 @@ copy_logs $? custom-channel-couch
echo y | ./eyfn.sh -m down echo y | ./eyfn.sh -m down
echo echo
echo "############### BYFN,EYFN WITH NODE Chaincode. TEST ################" echo "############### BYFN,EYFN WITH JAVASCRIPT Chaincode. TEST ################"
echo "####################################################################" echo "####################################################################"
echo y | ./byfn.sh -m up -l node -t 60 echo y | ./byfn.sh -m up -l javascript -t 60
copy_logs $? default-channel-node copy_logs $? default-channel-javascript
echo y | ./eyfn.sh -m up -l node -t 60 echo y | ./eyfn.sh -m up -l javascript -t 60
copy_logs $? default-channel-node copy_logs $? default-channel-javascript
echo y | ./eyfn.sh -m down echo y | ./eyfn.sh -m down
echo echo
echo "############### BYFN WITH CA TEST ################" echo "############### BYFN WITH CA TEST ################"
echo "##################################################" echo "##################################################"
echo y | ./byfn.sh -m up -a echo y | ./byfn.sh -m up -a
copy_logs $? default-channel-ca copy_logs $? default-channel-ca
echo y | ./byfn.sh -m down -a echo y | ./byfn.sh -m down -a
echo echo
echo "############### BYFN WITH NO CHAINCODE TEST ################" echo "############### BYFN WITH NO CHAINCODE TEST ################"
echo "############################################################" echo "############################################################"
echo y | ./byfn.sh -m up -n echo y | ./byfn.sh -m up -n
copy_logs $? default-channel-ca copy_logs $? default-channel-ca
echo y | ./byfn.sh -m down -n echo y | ./byfn.sh -m down -n
echo echo

View file

@ -64,12 +64,12 @@ set +x
echo echo
echo " #################################### " echo " #################################### "
echo -e "\033[1m NODE CHAINCODE\033[0m" echo -e "\033[1m JAVASCRIPT CHAINCODE\033[0m"
echo " # ################################## " echo " # ################################## "
set -x set -x
echo y | ./byfn.sh -m up -l node -t 60 echo y | ./byfn.sh -m up -l javascript -t 60
copy_logs $? default-channel-node copy_logs $? default-channel-javascript
echo y | ./eyfn.sh -m up -l node -t 60 echo y | ./eyfn.sh -m up -l javascript -t 60
copy_logs $? default-channel-node copy_logs $? default-channel-javascript
echo y | ./eyfn.sh -m down echo y | ./eyfn.sh -m down
set +x set +x