mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
A typo in the 10-appdev-e2e.sh script caused the shell to exit with an error status, and the killall command appears to match some key processes in the runner so removing. Also: - Update sample application and smart contract to Node 18, using the latest fabric-contact-api release. - Use release versions of Fabric v2.5 and update tool versions in workflow set up. - Use GitHub Action to install just instead of curl of install script. Signed-off-by: Mark S. Lewis <mark_lewis@uk.ibm.com>
56 lines
1.3 KiB
Bash
Executable file
56 lines
1.3 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -v -eou pipefail
|
|
|
|
# All tests run in the workshop root folder
|
|
cd "$(dirname "$0")"/..
|
|
|
|
export WORKSHOP_PATH="${PWD}"
|
|
export PATH="${WORKSHOP_PATH}/bin:${PATH}"
|
|
export FABRIC_CFG_PATH="${WORKSHOP_PATH}/config"
|
|
|
|
"${WORKSHOP_PATH}/check.sh"
|
|
|
|
CHAINCODE_PID=
|
|
|
|
function exitHook() {
|
|
|
|
# shut down the npm run
|
|
[ -n "${CHAINCODE_PID}" ] && kill "${CHAINCODE_PID}"
|
|
|
|
# Shut down microfab
|
|
docker kill microfab &> /dev/null
|
|
|
|
# Delete the network configuration and crypto material
|
|
rm -rf "${WORKSHOP_PATH}"/_cfg
|
|
}
|
|
|
|
trap exitHook SIGINT SIGTERM EXIT
|
|
|
|
just microfab
|
|
|
|
source "${WORKSHOP_PATH}/_cfg/uf/org1admin.env"
|
|
just debugcc
|
|
|
|
source "${WORKSHOP_PATH}/_cfg/uf/org1admin.env"
|
|
cd "${WORKSHOP_PATH}/contracts/asset-transfer-typescript"
|
|
npm install
|
|
npm run build
|
|
npm run start:server-nontls &
|
|
CHAINCODE_PID=$!
|
|
|
|
sleep 5
|
|
|
|
cd "${WORKSHOP_PATH}/applications/trader-typescript"
|
|
export ENDPOINT=org1peer-api.127-0-0-1.nip.io:8080
|
|
export MSP_ID=org1MSP
|
|
export CERTIFICATE=../../_cfg/uf/_msp/org1/org1admin/msp/signcerts/cert.pem
|
|
export PRIVATE_KEY=../../_cfg/uf/_msp/org1/org1admin/msp/keystore/cert_sk
|
|
npm install
|
|
npm start getAllAssets
|
|
npm start transact
|
|
npm start getAllAssets
|
|
npm start create banana bananaman yellow
|
|
npm start read banana
|
|
npm start delete banana
|
|
SIMULATED_FAILURE_COUNT=2 npm start listen
|