mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
Re-enable CI tests for asset-transfer-private-data JS app
Re-enable CI tests for asset-transfer-private-data JavaScript application. Also re-add the error when private asset details are not found in the collection, so that the CLI instructions work as desired, and to demonstrate error handing in the client application. Signed-off-by: David Enyeart <enyeart@us.ibm.com>
This commit is contained in:
parent
8bb870f930
commit
b3bc39ae5f
3 changed files with 9 additions and 10 deletions
|
|
@ -123,7 +123,7 @@ async function main() {
|
|||
let asset2Data = { objectType: assetType, assetID: assetID2, color: 'blue', size: 35, appraisedValue: 727 };
|
||||
|
||||
console.log('\n**************** As Org1 Client ****************');
|
||||
console.log('Adding Assets to work with: Submit Transaction: CreateAsset ' + assetID1);
|
||||
console.log('Adding Assets to work with:\n--> Submit Transaction: CreateAsset ' + assetID1);
|
||||
let statefulTxn = contractOrg1.createTransaction('CreateAsset');
|
||||
//if you need to customize endorsement to specific set of Orgs, use setEndorsingOrganizations
|
||||
//statefulTxn.setEndorsingOrganizations(mspOrg1);
|
||||
|
|
@ -255,4 +255,4 @@ async function main() {
|
|||
}
|
||||
}
|
||||
|
||||
main();
|
||||
main();
|
||||
|
|
|
|||
|
|
@ -147,7 +147,6 @@ func (s *SmartContract) QueryAssetByOwner(ctx contractapi.TransactionContextInte
|
|||
return queryResults, nil
|
||||
}
|
||||
|
||||
|
||||
// QueryAssets uses a query string to perform a query for assets.
|
||||
// Query string matching state database syntax is passed in and executed as is.
|
||||
// Supports ad hoc queries that can be defined at runtime by the client.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function createNetwork() {
|
|||
print "Creating network"
|
||||
./network.sh up createChannel -ca -s couchdb -i "${FABRIC_VERSION}"
|
||||
print "Deploying ${CHAINCODE_NAME} chaincode"
|
||||
./network.sh deployCC -ccn "${CHAINCODE_NAME}" -ccv 1 -ccs 1 -ccl "${CHAINCODE_LANGUAGE}"
|
||||
./network.sh deployCC -ccn "${CHAINCODE_NAME}" -ccv 1 -ccs 1 -ccl "${CHAINCODE_LANGUAGE}" -ccep "OR('Org1MSP.peer','Org2MSP.peer')" -cccg ../asset-transfer-private-data/chaincode-go/collections_config.json
|
||||
}
|
||||
|
||||
function stopNetwork() {
|
||||
|
|
@ -25,10 +25,10 @@ function stopNetwork() {
|
|||
|
||||
# Run Javascript application
|
||||
createNetwork
|
||||
#print "Initializing Javascript application"
|
||||
#pushd ../asset-transfer-private-data/application-javascript
|
||||
#npm install
|
||||
#print "Executing app.js"
|
||||
#node app.js
|
||||
#popd
|
||||
print "Initializing Javascript application"
|
||||
pushd ../asset-transfer-private-data/application-javascript
|
||||
npm install
|
||||
print "Executing app.js"
|
||||
node app.js
|
||||
popd
|
||||
stopNetwork
|
||||
|
|
|
|||
Loading…
Reference in a new issue