Skip to content

Commit

Permalink
fix(validator,example): fix bugs of sample code and README of validators
Browse files Browse the repository at this point in the history
Signed-off-by: KeitaieK <keita-cheers@jp.fujitsu.com>
  • Loading branch information
KeitatieK authored and takeutak committed Dec 4, 2020
1 parent 83f93da commit 8d2f9ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
6 changes: 4 additions & 2 deletions packages/ledger-plugin/fabric/validator/unit-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ This document describes the procedures for runnning fabric validator unit-test.
- The fabcar container is already running
- ProcedureURL: https://github.com/hyperledger/cactus/blob/master/packages/ledger-plugin/fabric/validator/unit-test/fabric-docker/README.md

## (a) Get car information
## How to unit-test fabric validator
- There are 2 unit-tests for fabric validator.
### step1: Get car information
- Target source: "queryCar.js"
- This script is for getting car information recorded in fabcar.

Expand All @@ -27,7 +29,7 @@ This document describes the procedures for runnning fabric validator unit-test.
<pre>
Transaction has been evaluated, result is: [{"Key":"CAR0", "Record":{"colour":"blue","make":"Toyota","model":"Prius","owner":"Tomoko"}},{"Key":"CAR1", "Record":{"colour":"red","make":"Ford","model":"Mustang","owner":"Brad"}},{"Key":"CAR2", "Record":{"colour":"green","make":"Hyundai","model":"Tucson","owner":"Jin Soo"}},{"Key":"CAR3", "Record":{"colour":"yellow","make":"Volkswagen","model":"Passat","owner":"Max"}},{"Key":"CAR4", "Record":{"colour":"black","make":"Tesla","model":"S","owner":"Adriana"}},{"Key":"CAR5", "Record":{"colour":"purple","make":"Peugeot","model":"205","owner":"Michel"}},{"Key":"CAR6", "Record":{"colour":"white","make":"Chery","model":"S22L","owner":"Aarav"}},{"Key":"CAR7", "Record":{"colour":"violet","make":"Fiat","model":"Punto","owner":"Pari"}},{"Key":"CAR8", "Record":{"colour":"indigo","make":"Tata","model":"Nano","owner":"Valeria"}},{"Key":"CAR9", "Record":{"colour":"brown","make":"Holden","model":"Barina","owner":"Shotaro"}}]</pre>

## (b) Asset transfer
### step2: Asset transfer
- Target source: "validatorDriver_signTransactionOffline.js"
- This script is for changing owner information.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ Ensure that the next containers are started.
3a06daddc298 hyperledger/fabric-orderer "orderer" 2 hours ago Up 2 hours 0.0.0.0:7050->7050/tcp orderer.example.com
b722f3d14f6e hyperledger/fabric-couchdb "tini -- /docker-ent…" 2 hours ago Up 2 hours 4369/tcp, 9100/tcp, 0.0.0.0:5984->5984/tcp couchdb

#### Remarks

According to the report from some contributor, in some environment the command `./startFabric.sh` fails, due to version incompatibility between fabric and couchdb. If you encounter the same situation, execute the following commands and re-execute this step:

curl -sSL https://bit.ly/2ysbOFE | bash -s -- 1.4.0 1.4.0
docker pull hyperledger/fabric-couchdb:0.4.14
docker tag hyperledger/fabric-couchdb:0.4.14 hyperledger/fabric-couchdb:latest



### 2) Registering an administrator user and general users

Change to the following directory:
Expand Down Expand Up @@ -76,14 +86,3 @@ Copy and extract wallet.tar to the following target directory:
[Deployment Method]

$ tar xvf wallet.tar

## Remarks

- According to the report from some contributor, in some environment the command `curl -sSL https://bit.ly/2ysbOFE | bash -s -- 1.4.0 1.4.0` fails to download coachdb and the following steps are failed. If you encount the same situation, please execute the commands instead of that:
```
curl -sSL https://bit.ly/2ysbOFE | bash -s -- 1.4.0 1.4.0
docker pull hyperledger/fabric-couchdb:0.4.14
docker tag hyperledger/fabric-couchdb:0.4.14 hyperledger/fabric-couchdb:latest
```


0 comments on commit 8d2f9ae

Please sign in to comment.