-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Matthew B White <[email protected]>
- Loading branch information
Showing
5 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ docker.log | |
|
||
# jsdoc output | ||
docs/gen | ||
fabric-samples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ const execSync = require('child_process').execSync; | |
const ordererCA = '/test-network/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem'; | ||
const dir = path.join(__dirname, '..', '..', 'fabric-samples'); | ||
const registerAndEnroll = () => { | ||
const cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
const cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
`export FABRIC_CA_CLIENT_HOME=${dir}/test-network/organizations/peerOrganizations/org1.example.com/ && ` + | ||
`fabric-ca-client register --caname ca-org1 --id.name owner --id.secret ownerpw --id.type client --tls.certfiles "${dir}/test-network/organizations/fabric-ca/org1/tls-cert.pem" && ` + | ||
`fabric-ca-client enroll -u https://owner:ownerpw@localhost:7054 --caname ca-org1 -M "${dir}/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp" --tls.certfiles "${dir}/test-network/organizations/fabric-ca/org1/tls-cert.pem" && ` + | ||
|
@@ -52,7 +52,7 @@ async function install(ccName, transient) { | |
async function instantiate(ccName, func, args) { | ||
let res = null; | ||
if (func !== undefined) { | ||
const initCmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
const initCmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org1MSP" && ` + | ||
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt && ` + | ||
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp && ` + | ||
|
@@ -77,7 +77,7 @@ function printArgs(func, args) { | |
} | ||
|
||
async function invoke(ccName, func, args, transient) { | ||
let cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
let cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org1MSP" && ` + | ||
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt && ` + | ||
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org1.example.com/users/[email protected]/msp && ` + | ||
|
@@ -95,7 +95,7 @@ async function invoke(ccName, func, args, transient) { | |
} | ||
|
||
async function query(ccName, func, args, transient) { | ||
let cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
let cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org2MSP" && ` + | ||
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt && ` + | ||
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org2.example.com/users/[email protected]/msp && ` + | ||
|
@@ -120,7 +120,7 @@ async function installAndInstantiate(ccName, instantiateFunc, instantiateArgs, t | |
} | ||
|
||
async function getLastBlock() { | ||
const cmd = `export PATH=${dir}/bin:$PATH && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
const cmd = `export PATH="${dir}/bin:$PATH" && export FABRIC_CFG_PATH=${dir}/config/ && ` + | ||
`export CORE_PEER_TLS_ENABLED=true && export CORE_PEER_LOCALMSPID="Org2MSP" && ` + | ||
`export CORE_PEER_TLS_ROOTCERT_FILE=${dir}/test-network/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt && ` + | ||
`export CORE_PEER_MSPCONFIGPATH=${dir}/test-network/organizations/peerOrganizations/org2.example.com/users/[email protected]/msp && ` + | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters