diff --git a/app/platform/fabric/e2e-test/configs/connection-profile/org1-network.json b/app/platform/fabric/e2e-test/configs/connection-profile/org1-network.json index 07379fdd4..b6a030a26 100644 --- a/app/platform/fabric/e2e-test/configs/connection-profile/org1-network.json +++ b/app/platform/fabric/e2e-test/configs/connection-profile/org1-network.json @@ -1,5 +1,5 @@ { - "name": "first-network", + "name": "org1-network", "version": "1.0.0", "license": "Apache-2.0", "client": { diff --git a/app/platform/fabric/e2e-test/runTestSuite.sh b/app/platform/fabric/e2e-test/runTestSuite.sh index 28eba5502..be828a4c3 100755 --- a/app/platform/fabric/e2e-test/runTestSuite.sh +++ b/app/platform/fabric/e2e-test/runTestSuite.sh @@ -1,30 +1,97 @@ #!/bin/bash +ROOTDIR="$(cd "$(dirname "$0")"/../../../.. && pwd)" +FABRIC_V1_VERSION=1.4.6 +FABRIC_V2_VERSION=2.1.1 + echo "#### Downloaded fabric-test repo" +if [ $# -eq 0 ]; then + echo "$0 [-1 | -2]" + exit 1; +fi + +while getopts "12" opt; do + case "$opt" in + 1) + SDKVER=1.4.8 + export FABRIC_VERSION=1 + export RELEASE_VERSION=1.4-stable + CHECKOUT_HASH=45799a2ee4eefa49ae705cc57ed415270c35d60a + # export FABRIC_CFG_PATH=$GOPATH/src/github.com/hyperledger/fabric-test/scripts/config + export PATH=$GOPATH/src/github.com/hyperledger/fabric-test/scripts/bin:$PATH + PULL_PEER_IMAGE_VERSION=${FABRIC_V1_VERSION} + PULL_CA_IMAGE_VERSION=${FABRIC_V1_VERSION} + ;; + 2) + SDKVER=2.0.0-beta.2 + export FABRIC_VERSION=2 + CHECKOUT_HASH=09680bea5aa0ec464982f7979fd99a777e8c1fed + export FABRIC_CFG_PATH=$GOPATH/src/github.com/hyperledger/fabric-test/config + export PATH=$GOPATH/src/github.com/hyperledger/fabric-test/bin:$PATH + PULL_PEER_IMAGE_VERSION=${FABRIC_V2_VERSION} + PULL_CA_IMAGE_VERSION=${FABRIC_V1_VERSION} + ;; + *) + echo "$0 [-1 | -2]" + exit 1; + ;; + esac +done + +echo "HASH: ${CHECKOUT_HASH}" +echo "SDK : ${SDKVER}" +echo "ROOT: ${ROOTDIR}" + set -e mkdir -p $GOPATH/src/github.com/hyperledger pushd $GOPATH/src/github.com/hyperledger +sudo rm -rf fabric-test if [ ! -d fabric-test ]; then - git clone https://github.com/hyperledger/fabric-test.git -b release-1.4 + git clone https://github.com/hyperledger/fabric-test.git fi cd fabric-test -git checkout 45799a2ee4eefa49ae705cc57ed415270c35d60a +# git checkout 45799a2ee4eefa49ae705cc57ed415270c35d60a +git checkout ${CHECKOUT_HASH} +make pull-binaries-fabric echo "#### Updated each sub-module under fabric-test repo" popd pushd $GOPATH/src/github.com/hyperledger/fabric-test/tools/PTE -npm install fabric-client@1.4.8 -npm install fabric-ca-client@1.4.8 +npm install fabric-client@${SDKVER} +npm install fabric-ca-client@${SDKVER} echo "#### Installed required node packages" popd +pushd $ROOTDIR/app/platform/fabric/e2e-test rm -f PTE ln -s $GOPATH/src/github.com/hyperledger/fabric-test/tools/PTE ./PTE +popd + +pushd $ROOTDIR +rm -rf wallet logs +popd + +curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- ${PULL_PEER_IMAGE_VERSION} ${PULL_CA_IMAGE_VERSION} 0.4.18 -s -b +docker pull hyperledger/fabric-ca:${FABRIC_V1_VERSION} +docker tag hyperledger/fabric-ca:${FABRIC_V1_VERSION} hyperledger/fabric-ca:${FABRIC_V2_VERSION} + +pushd $ROOTDIR/app/platform/fabric/e2e-test/specs + +rm -rf templates +sed -i -e '/github.com\/hyperledger\/fabric-test/d' go.mod +if [ ${FABRIC_VERSION} -eq 2 ]; then + cp -a templates-v2 templates + go get github.com/hyperledger/fabric-test@${CHECKOUT_HASH} + go get github.com/hyperledger/fabric-test/tools/operator@${CHECKOUT_HASH} + go get github.com/hyperledger/fabric-test/chaincodes/samplecc/go@${CHECKOUT_HASH} +else + cp -a templates-v1 templates + go get github.com/hyperledger/fabric-test@${CHECKOUT_HASH} +fi -pushd specs echo "#### Starting Ginkgo based test suite" -ginkgo -v -stream +ginkgo -v -stream -failFast popd \ No newline at end of file diff --git a/app/platform/fabric/e2e-test/specs/apitest-input-multiprofile.yml b/app/platform/fabric/e2e-test/specs/apitest-input-multiprofile.yml index e2201b284..7c679937b 100644 --- a/app/platform/fabric/e2e-test/specs/apitest-input-multiprofile.yml +++ b/app/platform/fabric/e2e-test/specs/apitest-input-multiprofile.yml @@ -48,22 +48,17 @@ joinChannel: installChaincode: # installs chaincode with specified name on all peers in listed organziations - name: samplecc + sdk: cli version: v1 path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go organizations: org1,org2 language: golang metadataPath: "" - - name: samplecc - version: v2 - path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go - organizations: org1,org2 - language: golang - metadataPath: "" - instantiateChaincode: - channelName: commonchannel name: samplecc + sdk: cli version: v1 args: "" organizations: org1 @@ -71,27 +66,12 @@ instantiateChaincode: collectionPath: "" - channelName: org1channel name: samplecc + sdk: cli version: v1 args: "" organizations: org1 endorsementPolicy: 1of(org1) collectionPath: "" - - channelName: org2channel - name: samplecc - version: v1 - args: "" - organizations: org2 - endorsementPolicy: 1of(org2) - collectionPath: "" - -upgradeChaincode: - - channelName: testorgschannel0 - name: samplecc - version: v2 - args: "" - organizations: org1 - endorsementPolicy: 1of(org1,org2) - collectionPath: "" invokes: - channelName: commonchannel @@ -117,21 +97,3 @@ invokes: payLoadMin: 1024 payLoadMax: 2048 args: "put,a1,1" - -queries: - - channelName: testorgschannel0 - name: samplecc - targetPeers: OrgAnchor - nProcPerOrg: 1 - nRequest: 1 - runDur: 0 - organizations: org1,org2 - ccOpt: - ccType: ccchecker - keyStart: 0 - txnOpt: - - mode: constant - options: - constFreq: 0 - devFreq: 0 - args: "get,a1" diff --git a/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile.yml b/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile.yml index 759dd4815..74adc00f8 100644 --- a/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile.yml +++ b/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile.yml @@ -1,62 +1,49 @@ organizations: - name: org1 -#! For smoke test suite, connection-profile are read from smoke directory connProfilePath: ./connection-profile/connection_profile_org1.yaml - name: org2 connProfilePath: ./connection-profile/connection_profile_org2.yaml createChannel: - channelName: commonchannel -#! For smoke test suite, channel-artifacts are read from smoke directory channelTxPath: ./channel-artifacts/commonchannel/commonchannel.tx organizations: org1 - channelName: org1channel -#! For smoke test suite, channel-artifacts are read from smoke directory channelTxPath: ./channel-artifacts/org1channel/org1channel.tx organizations: org1 - channelName: org2channel -#! For smoke test suite, channel-artifacts are read from smoke directory channelTxPath: ./channel-artifacts/org2channel/org2channel.tx organizations: org2 anchorPeerUpdate: - channelName: commonchannel organizations: org1 -#! For smoke test suite, channel-artifacts are read from smoke directory anchorPeerUpdateTxPath: ./channel-artifacts/commonchannel/commonchannelorg1anchor.tx - channelName: commonchannel organizations: org2 anchorPeerUpdateTxPath: ./channel-artifacts/commonchannel/commonchannelorg2anchor.tx - channelName: org1channel organizations: org1 -#! For smoke test suite, channel-artifacts are read from smoke directory anchorPeerUpdateTxPath: ./channel-artifacts/org1channel/org1channelorg1anchor.tx joinChannel: -# joins all peers in listed organziations to all channels based on channelPrefix and numChannels - channelName: commonchannel organizations: org1,org2 - channelName: org1channel organizations: org1 installChaincode: -# installs chaincode with specified name on all peers in listed organziations - name: samplecc + sdk: cli version: v1 path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go organizations: org1,org2 language: golang metadataPath: "" - - name: samplecc - version: v2 - path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go - organizations: org1,org2 - language: golang - metadataPath: "" - instantiateChaincode: - channelName: commonchannel + sdk: cli name: samplecc version: v1 args: "" @@ -64,15 +51,6 @@ instantiateChaincode: endorsementPolicy: 2of(org1,org2) collectionPath: "" -upgradeChaincode: - - channelName: testorgschannel0 - name: samplecc - version: v2 - args: "" - organizations: org1 - endorsementPolicy: 1of(org1,org2) - collectionPath: "" - invokes: - channelName: commonchannel name: samplecc diff --git a/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile_addnewch.yml b/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile_addnewch.yml index 0c5b318d8..8c1423daf 100644 --- a/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile_addnewch.yml +++ b/app/platform/fabric/e2e-test/specs/apitest-input-singleprofile_addnewch.yml @@ -1,61 +1,43 @@ organizations: - name: org1 -#! For smoke test suite, connection-profile are read from smoke directory connProfilePath: ./connection-profile/connection_profile_org1.yaml - name: org2 connProfilePath: ./connection-profile/connection_profile_org2.yaml createChannel: - channelName: channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422 -#! For smoke test suite, channel-artifacts are read from smoke directory channelTxPath: ./channel-artifacts/channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422/channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422.tx organizations: org1 anchorPeerUpdate: - channelName: channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422 organizations: org1 -#! For smoke test suite, channel-artifacts are read from smoke directory anchorPeerUpdateTxPath: ./channel-artifacts/channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422/channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422org1anchor.tx joinChannel: -# joins all peers in listed organziations to all channels based on channelPrefix and numChannels - channelName: channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422 organizations: org1 installChaincode: # installs chaincode with specified name on all peers in listed organziations - name: samplecc + sdk: cli version: v1 path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go organizations: org1,org2 language: golang metadataPath: "" - - name: samplecc - version: v2 - path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go - organizations: org1,org2 - language: golang - metadataPath: "" - instantiateChaincode: - channelName: channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422 name: samplecc + sdk: cli version: v1 args: "" organizations: org1 endorsementPolicy: 1of(org1,org2) collectionPath: "" -upgradeChaincode: - - channelName: testorgschannel0 - name: samplecc - version: v2 - args: "" - organizations: org1 - endorsementPolicy: 1of(org1,org2) - collectionPath: "" - invokes: - channelName: channel2422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422422 name: samplecc diff --git a/app/platform/fabric/e2e-test/specs/apitest-network-spec-v2.yml b/app/platform/fabric/e2e-test/specs/apitest-network-spec-v2.yml new file mode 100644 index 000000000..15d399162 --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/apitest-network-spec-v2.yml @@ -0,0 +1,130 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +--- +dockerOrg: hyperledger +dockerTag: 2.1.1 + +#! peer database ledger type (couchdb, goleveldb) +dbType: goleveldb +#! This parameter is used to define fabric logging spec in peers +peerFabricLoggingSpec: info +#! This parameter is used to define fabric logging spec in orderers +ordererFabricLoggingSpec: info +#! tls in the network (true, false or mutual(mutualtls)) +tls: true +#! fabric metrics with prometheus (true/false) +metrics: false +#! true - enable gossip and dynamic leader election +#! false - disable gossip and set all peers as org leaders +gossipEnable: true +#! enable node ou's in fabric network (true/false) +enableNodeOUs: true + +#! For basicnetwork test suite, crypto-config, connection-profile +#! and channel-artifacts are stored in basicnetwork directory +artifactsLocation: . + +#! Orderer Config Settings +orderer: +#! Consensus type + ordererType: etcdraft + batchSize: + maxMessageCount: 500 + absoluteMaxBytes: 10 MB + preferredMaxBytes: 2 MB + batchTimeOut: 2s +#! Etcd raft options and this will be used when ordererType is +#! selected as etcdraft + etcdraftOptions: + tickInterval: 500ms + electionTick: 10 + heartbeatTick: 1 + maxInflightBlocks: 5 + snapshotIntervalSize: 16 MB + +#! Not being used for basicnetwork test suite +#! Number of kafka and zookeeper to be launched in network +#! when ordererType is kafka +kafka: + numKafka: 5 + #! number of kafka replications for each channel + numKafkaReplications: 3 + numZookeepers: 3 + +ordererOrganizations: +- name: ordererorg1 + mspId: OrdererOrgExampleCom + numOderers: 1 + numCa: 0 + +peerOrganizations: +- name: org1 + mspId: Org1ExampleCom + numPeers: 1 + numCa: 1 + +- name: org2 + mspId: Org2ExampleCom + numPeers: 1 + numCa: 1 + +#! Capabilites for Orderer, Channel, Application groups +ordererCapabilities: V2_0 + +channelCapabilities: V2_0 + +applicationCapabilities: V2_0 + +numChannels: 1 + +#! Not being used for basic network test suite +k8s: + serviceType: NodePort + #! dataPersistence is used to store the data from fabric containers + #! It can take values of true, false and local + #! When true is used, it uses storageClass and storageCapacity to create + #! persistent volumes. When false is used, backup will not be configured. + #! When local is used, hostPath will be used to store the data from + #! fabric containers to worker nodes on which pods are running. + dataPersistence: true + storageClass: default + storageCapacity: 20Gi + resources: + orderers: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: "0.5" + memory: 1Gi + peers: + limits: + cpu: "0.5" + memory: 2Gi + requests: + cpu: "0.5" + memory: 2Gi +#! dind will be used to run all chaincode containers of a peer + dind: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: "1" + memory: 1Gi + couchdb: + limits: + cpu: "0.2" + memory: 1Gi + requests: + cpu: "0.1" + memory: 1Gi + kafka: + limits: + cpu: "0.2" + memory: 1Gi + requests: + cpu: "0.1" + memory: 1Gi diff --git a/app/platform/fabric/e2e-test/specs/apitest-network-spec.yml b/app/platform/fabric/e2e-test/specs/apitest-network-spec.yml index 1f34ae152..62127eeb0 100644 --- a/app/platform/fabric/e2e-test/specs/apitest-network-spec.yml +++ b/app/platform/fabric/e2e-test/specs/apitest-network-spec.yml @@ -58,7 +58,7 @@ kafka: ordererOrganizations: - name: ordererorg1 mspId: OrdererOrgExampleCom - numOderers: 3 + numOderers: 1 numCa: 0 peerOrganizations: diff --git a/app/platform/fabric/e2e-test/specs/apitest_test.go b/app/platform/fabric/e2e-test/specs/apitest_test.go index 8543e22cf..2414a23af 100644 --- a/app/platform/fabric/e2e-test/specs/apitest_test.go +++ b/app/platform/fabric/e2e-test/specs/apitest_test.go @@ -42,7 +42,13 @@ var _ = Describe("REST API Test Suite - Single profile", func() { ) It("Starting fabric network", func() { - networkSpecPath = "apitest-network-spec.yml" + var fabricVer = os.Getenv("FABRIC_VERSION") + if fabricVer == "1" { + networkSpecPath = "apitest-network-spec.yml" + } else { + networkSpecPath = "apitest-network-spec-v2.yml" + } + fmt.Printf("Network spec is %s\n", networkSpecPath) err := launcher.Launcher("up", "docker", "", networkSpecPath) Expect(err).NotTo(HaveOccurred()) }) @@ -286,7 +292,12 @@ var _ = Describe("REST API Test Suite - Multiple profile", func() { ) It("Starting fabric network", func() { - networkSpecPath = "apitest-network-spec.yml" + var fabricVer = os.Getenv("FABRIC_VERSION") + if fabricVer == "1" { + networkSpecPath = "apitest-network-spec.yml" + } else { + networkSpecPath = "apitest-network-spec-v2.yml" + } err := launcher.Launcher("up", "docker", "", networkSpecPath) Expect(err).NotTo(HaveOccurred()) }) @@ -438,21 +449,21 @@ var _ = Describe("REST API Test Suite - Multiple profile", func() { compareChannelsInfoTxCount(result2, result3, "commonchannel", 0) compareChannelsInfoTxCount(result2, result3, "org1channel", 1) - action = "invoke" - inputSpecPath = "apitest-input-multiprofile-invoke-org2.yml" - err = testclient.Testclient(action, inputSpecPath) - Expect(err).NotTo(HaveOccurred()) + // action = "invoke" + // inputSpecPath = "apitest-input-multiprofile-invoke-org2.yml" + // err = testclient.Testclient(action, inputSpecPath) + // Expect(err).NotTo(HaveOccurred()) - time.Sleep(waitSyncInterval * time.Second) + // time.Sleep(waitSyncInterval * time.Second) - resp4 := restGetWithToken("/api/channels/info", &ChannelsInfoResp{}, token) - result4 := resp4.Result().(*ChannelsInfoResp) - fmt.Fprintf(GinkgoWriter, "Info: result4 %+v\n", result4) + // resp4 := restGetWithToken("/api/channels/info", &ChannelsInfoResp{}, token) + // result4 := resp4.Result().(*ChannelsInfoResp) + // fmt.Fprintf(GinkgoWriter, "Info: result4 %+v\n", result4) - compareChannelsInfoBlockCount(result3, result4, "commonchannel", 0) - compareChannelsInfoBlockCount(result3, result4, "org1channel", 0) - compareChannelsInfoTxCount(result3, result4, "commonchannel", 0) - compareChannelsInfoTxCount(result3, result4, "org1channel", 0) + // compareChannelsInfoBlockCount(result3, result4, "commonchannel", 0) + // compareChannelsInfoBlockCount(result3, result4, "org1channel", 0) + // compareChannelsInfoTxCount(result3, result4, "commonchannel", 0) + // compareChannelsInfoTxCount(result3, result4, "org1channel", 0) action = "invoke" inputSpecPath = "apitest-input-multiprofile-invoke-common.yml" @@ -465,10 +476,10 @@ var _ = Describe("REST API Test Suite - Multiple profile", func() { result5 := resp5.Result().(*ChannelsInfoResp) fmt.Fprintf(GinkgoWriter, "Info: result5 %+v\n", result5) - compareChannelsInfoBlockCount(result4, result5, "commonchannel", 1) - compareChannelsInfoBlockCount(result4, result5, "org1channel", 0) - compareChannelsInfoTxCount(result4, result5, "commonchannel", 1) - compareChannelsInfoTxCount(result4, result5, "org1channel", 0) + compareChannelsInfoBlockCount(result3, result5, "commonchannel", 1) + compareChannelsInfoBlockCount(result3, result5, "org1channel", 0) + compareChannelsInfoTxCount(result3, result5, "commonchannel", 1) + compareChannelsInfoTxCount(result3, result5, "org1channel", 0) }) It("get channels info for org2", func() { @@ -503,21 +514,21 @@ var _ = Describe("REST API Test Suite - Multiple profile", func() { compareChannelsInfoTxCount(result2, result3, "commonchannel", 0) compareChannelsInfoTxCount(result2, result3, "org2channel", 0) - action = "invoke" - inputSpecPath = "apitest-input-multiprofile-invoke-org2.yml" - err = testclient.Testclient(action, inputSpecPath) - Expect(err).NotTo(HaveOccurred()) + // action = "invoke" + // inputSpecPath = "apitest-input-multiprofile-invoke-org2.yml" + // err = testclient.Testclient(action, inputSpecPath) + // Expect(err).NotTo(HaveOccurred()) - time.Sleep(waitSyncInterval * time.Second) + // time.Sleep(waitSyncInterval * time.Second) - resp4 := restGetWithToken("/api/channels/info", &ChannelsInfoResp{}, token) - result4 := resp4.Result().(*ChannelsInfoResp) - fmt.Fprintf(GinkgoWriter, "Info: result4 %+v\n", result4) + // resp4 := restGetWithToken("/api/channels/info", &ChannelsInfoResp{}, token) + // result4 := resp4.Result().(*ChannelsInfoResp) + // fmt.Fprintf(GinkgoWriter, "Info: result4 %+v\n", result4) - compareChannelsInfoBlockCount(result3, result4, "commonchannel", 0) - compareChannelsInfoBlockCount(result3, result4, "org2channel", 1) - compareChannelsInfoTxCount(result3, result4, "commonchannel", 0) - compareChannelsInfoTxCount(result3, result4, "org2channel", 1) + // compareChannelsInfoBlockCount(result3, result4, "commonchannel", 0) + // compareChannelsInfoBlockCount(result3, result4, "org2channel", 1) + // compareChannelsInfoTxCount(result3, result4, "commonchannel", 0) + // compareChannelsInfoTxCount(result3, result4, "org2channel", 1) action = "invoke" inputSpecPath = "apitest-input-multiprofile-invoke-common.yml" @@ -530,10 +541,10 @@ var _ = Describe("REST API Test Suite - Multiple profile", func() { result5 := resp5.Result().(*ChannelsInfoResp) fmt.Fprintf(GinkgoWriter, "Info: result5 %+v\n", result5) - compareChannelsInfoBlockCount(result4, result5, "commonchannel", 1) - compareChannelsInfoBlockCount(result4, result5, "org2channel", 0) - compareChannelsInfoTxCount(result4, result5, "commonchannel", 1) - compareChannelsInfoTxCount(result4, result5, "org2channel", 0) + compareChannelsInfoBlockCount(result3, result5, "commonchannel", 1) + compareChannelsInfoBlockCount(result3, result5, "org2channel", 0) + compareChannelsInfoTxCount(result3, result5, "commonchannel", 1) + compareChannelsInfoTxCount(result3, result5, "org2channel", 0) }) }) diff --git a/app/platform/fabric/e2e-test/specs/genchannelartifacts.sh b/app/platform/fabric/e2e-test/specs/genchannelartifacts.sh index 13fc89e91..625add5ba 100755 --- a/app/platform/fabric/e2e-test/specs/genchannelartifacts.sh +++ b/app/platform/fabric/e2e-test/specs/genchannelartifacts.sh @@ -6,7 +6,7 @@ function genChTx() ch=$1 pushd ${SCRIPTPATH}/configFiles mkdir -p ../channel-artifacts/$ch - configtxgen -profile ${CHPROFILE} -outputCreateChannelTx ../channel-artifacts/${ch}/${ch}.tx -channelID ${ch} + configtxgen -configPath . -profile ${CHPROFILE} -outputCreateChannelTx ../channel-artifacts/${ch}/${ch}.tx -channelID ${ch} popd } @@ -16,7 +16,7 @@ function genAnchorTx() org=$2 pushd ${SCRIPTPATH}/configFiles mkdir -p ../channel-artifacts/$ch - configtxgen -profile ${CHPROFILE} -outputAnchorPeersUpdate ../channel-artifacts/${ch}/${ch}org${org}anchor.tx -channelID ${ch} -asOrg org${org} + configtxgen -configPath . -profile ${CHPROFILE} -outputAnchorPeersUpdate ../channel-artifacts/${ch}/${ch}org${org}anchor.tx -channelID ${ch} -asOrg org${org} popd } diff --git a/app/platform/fabric/e2e-test/specs/go.mod b/app/platform/fabric/e2e-test/specs/go.mod index f40c318bf..0c55ba043 100644 --- a/app/platform/fabric/e2e-test/specs/go.mod +++ b/app/platform/fabric/e2e-test/specs/go.mod @@ -6,6 +6,7 @@ go 1.13 require ( github.com/cosiner/argv v0.0.1 // indirect + github.com/fsouza/go-dockerclient v1.6.3 // indirect github.com/go-delve/delve v1.4.0 // indirect github.com/go-resty/resty/v2 v2.1.0 github.com/hyperledger/fabric-test v1.4.5-0.20200212013951-45799a2ee4ee @@ -22,7 +23,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect go.starlark.net v0.0.0-20200203144150-6677ee5c7211 // indirect golang.org/x/arch v0.0.0-20191126211547-368ea8f32fff // indirect - golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6 // indirect golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 // indirect gopkg.in/yaml.v2 v2.2.8 // indirect + k8s.io/client-go v0.16.8 // indirect ) diff --git a/app/platform/fabric/e2e-test/specs/go.sum b/app/platform/fabric/e2e-test/specs/go.sum index 5492c0482..f429e81ed 100644 --- a/app/platform/fabric/e2e-test/specs/go.sum +++ b/app/platform/fabric/e2e-test/specs/go.sum @@ -1,36 +1,177 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0 h1:ROfEUZz+Gh5pa62DJWXSaonyu3StP6EA6lPEXPI6mCo= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs= +github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest/adal v0.5.0 h1:q2gDruN08/guU9vAjuPWff0+QIrpH6ediguzdAzXAUU= +github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/date v0.1.0 h1:YGrhWfrgtFs84+h0o46rJrlmsZtyZRg470CqAXTZaGM= +github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/logger v0.1.0 h1:ruG4BSDXONFRrZZJ2GUXDiUyVpayPmb1GnWeHDdaNKY= +github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k= +github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/hcsshim v0.8.7-0.20191101173118-65519b62243c/go.mod h1:7xhjOwRV2+0HXGmM0jxaEu+ZiXJFoVZOTfL/dmqbrD8= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0 h1:xjvXQWABwS2uiv3TWgQt5Uth60Gu86LTGZXMJkjc7rY= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc h1:TP+534wVlf61smEIq1nwLLAjQVEK2EADoW3CX9AuT+8= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/cosiner/argv v0.0.0-20170225145430-13bacc38a0a5/go.mod h1:p/NrK5tF6ICIly4qwEDsf6VDirFiWWz0FenfYBwJaKQ= github.com/cosiner/argv v0.0.1/go.mod h1:p/NrK5tF6ICIly4qwEDsf6VDirFiWWz0FenfYBwJaKQ= github.com/cpuguy83/go-md2man v1.0.8/go.mod h1:N6JayAiVKtlHSnuTCeuLSQVs75hb8q+dYQLjr7cDsKY= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= +github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23 h1:oqgGT9O61YAYvI41EBsLePOr+LE6roB0xY4gpkZuFSE= +github.com/docker/docker v1.4.2-0.20191101170500-ac7306503d23/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= +github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsouza/go-dockerclient v1.6.3 h1:VS/I3mxieZVIeaWXd57JKvSjheELafUJYtblGg75RIQ= +github.com/fsouza/go-dockerclient v1.6.3/go.mod h1:OiSy/IhZIF+zheikZkXK7LVpGzxWchJPJKGWhBqOK4M= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-delve/delve v1.4.0/go.mod h1:gQM0ReOJLNAvPuKAXfjHngtE93C2yc/ekTbo7YbAHSo= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-resty/resty v1.12.0 h1:L1P5qymrXL5H/doXe2pKUr1wxovAI5ilm2LdVLbwThc= github.com/go-resty/resty/v2 v2.1.0 h1:Z6IefCpUMfnvItVJaJXWv/pMiiD11So35QgwEELsldE= github.com/go-resty/resty/v2 v2.1.0/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/go-resty/resty/v2 v2.3.0 h1:JOOeAvjSlapTT92p8xiS19Zxev1neGikoHsXJeOq8So= +github.com/go-resty/resty/v2 v2.3.0/go.mod h1:UpN9CgLZNsv4e9XG50UU8xdI0F43UQ4HmxLBDwaroHU= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d h1:3PaI8p3seN09VjbTYC/QWlUZdZ1qS1zGjy7LH2Wt07I= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d h1:7XGaL1e6bYS1yIonGp9761ExpPPV1ui0SAC59Yube9k= +github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= +github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= +github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20191108205148-17c4b2760b56 h1:BUCrT0VEO4ryJ7DAEGccqnEJcdHydx7wIJQ0ZGFEjJM= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20191108205148-17c4b2760b56/go.mod h1:HZK6PKLWrvdD/t0oSLiyaRaUM6fZ7qjJuOlb0zrn0mo= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed h1:VNnrD/ilIUO9DDHQP/uioYSy1309rYy0Z1jf3GLNRIc= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20200128192331-2d899240a7ed/go.mod h1:N7H3sA7Tx4k/YzFq7U0EPdqJtqvM4Kild0JoCc7C0Dc= +github.com/hyperledger/fabric-protos-go v0.0.0-20190821214336-621b908d5022/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/hyperledger/fabric-protos-go v0.0.0-20190919234611-2a87503ac7c9/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/hyperledger/fabric-protos-go v0.0.0-20191114160927-6bee4929a99f h1:t6+iLphkbJrM8i6YB0T/XxvoTlo50FglEf2hMJHxuOo= +github.com/hyperledger/fabric-protos-go v0.0.0-20191114160927-6bee4929a99f/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b h1:rZ3Vro68vStzLYfcSrQlprjjCf5UmFk7QjKGgHL8IQg= +github.com/hyperledger/fabric-protos-go v0.0.0-20200124220212-e9cfc186ba7b/go.mod h1:xVYTjK4DtZRBxZ2D9aE4y6AbLaPwue2o/criQyQbVD0= +github.com/hyperledger/fabric-test v1.1.1-0.20200602235422-8130ea524534 h1:IoEt519hdNchAhNVOTJWxqJwibNJMqpVduZUuDZWonk= +github.com/hyperledger/fabric-test v1.1.1-0.20200602235422-8130ea524534/go.mod h1:7K2xXfkAUybufYc/nYZEfJx/B84HnjHHsy6eKWZJyc4= github.com/hyperledger/fabric-test v1.4.4 h1:17Yu+p0QQZlswQFHYs9Jt/2hTgunsqInhMU8qXdJeDc= github.com/hyperledger/fabric-test v1.4.4/go.mod h1:7K2xXfkAUybufYc/nYZEfJx/B84HnjHHsy6eKWZJyc4= github.com/hyperledger/fabric-test v1.4.5-0.20200212013951-45799a2ee4ee h1:/nHTnB6bE9G/U+1k0C3xdYgcH87nwuIzMuS9vJkBwh0= github.com/hyperledger/fabric-test v1.4.5-0.20200212013951-45799a2ee4ee/go.mod h1:fMKcxSNixj6MfTor0vaAPfjHJWA8baAcdA6j34xLHjY= +github.com/hyperledger/fabric-test/chaincodes/map_private/go v0.0.0-20200611144040-edd51e960b6c/go.mod h1:PC+SukUNTSaGfJ4j8vLy2i+d9XEOVUAOo5uCZJ8l4vc= +github.com/hyperledger/fabric-test/chaincodes/samplecc/go v0.0.0-20200602235422-8130ea524534 h1:gxAvWIqDN8x+QwhAfN+GP5Wc1+5xKgrfMSowEfWvtAU= +github.com/hyperledger/fabric-test/chaincodes/samplecc/go v0.0.0-20200602235422-8130ea524534/go.mod h1:Gu+ViqSq7xBlCVXZ/Xc2UNzQnmB9AVE+VdGDi3dtB/k= +github.com/hyperledger/fabric-test/chaincodes/samplecc/go v0.0.0-20200611144040-edd51e960b6c h1:YSNDeWnWDP3jp83JKoCR6UXiYjfL2ybG/EZjZHaqgUw= +github.com/hyperledger/fabric-test/chaincodes/samplecc/go v0.0.0-20200611144040-edd51e960b6c/go.mod h1:w9KGdx1MrLVDjPNgfLB8nNVIQfmtleXnaUsHF3f4NRE= +github.com/hyperledger/fabric-test/chaincodes/samplecc/go v0.0.0-20200616193113-0a13b4e6d1e4 h1:hKTixQIRQYHGmqfhN54vMgHjNYvJVUV5BEAkvgqwsMM= +github.com/hyperledger/fabric-test/chaincodes/samplecc/go v0.0.0-20200616193113-0a13b4e6d1e4/go.mod h1:w9KGdx1MrLVDjPNgfLB8nNVIQfmtleXnaUsHF3f4NRE= +github.com/hyperledger/fabric-test/tools/operator v0.0.0-20200602235422-8130ea524534 h1:/9jpwhVEjg4m39EHL2ClWKDDlMgY1cMB9Pteisf0+3w= +github.com/hyperledger/fabric-test/tools/operator v0.0.0-20200602235422-8130ea524534/go.mod h1:a4pzUdEbtQ2uZLAd5vLdqL8i6Tra6OGrIp3lg/lajGE= +github.com/hyperledger/fabric-test/tools/operator v0.0.0-20200616193113-0a13b4e6d1e4 h1:bPfJemn+qTuGY+/+mswZ5Y6+ONlKKc+To5acfOFV7oc= +github.com/hyperledger/fabric-test/tools/operator v0.0.0-20200616193113-0a13b4e6d1e4/go.mod h1:jCMmBqWiw9P19tfq5ebCQHI1YZFUPWFwnJJAbD2Q00A= +github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7 h1:KfgG9LzI+pYjr4xvmz/5H4FXjokeP+rlHLhv3iH62Fo= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.0-20170327083344-ded68f7a9561/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= @@ -40,82 +181,241 @@ github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzp github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0 h1:Iw5WCbBcaAAd0fpRb1c9r5YCylv4XDoCSigm1zLevwU= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1 h1:K0jcRCwNQM3vFGh1ppMtDh/+7ApJrjldlX8fA0jDTLQ= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.9.0 h1:R1uwffexN6Pr340GtYRIdZmAiN4J+iw6WG4wog1DUXg= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1 h1:GlxAyO6x8rfZYN9Tt0Kti5a/cP41iuiO2yYT0IJGY8Y= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v0.0.0-20170317030525-88609521dc4b/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= github.com/peterh/liner v1.2.0/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v0.0.0-20170413231811-06b906832ed0/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/russross/blackfriday v0.0.0-20180428102519-11635eb403ff/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sirupsen/logrus v0.0.0-20180523074243-ea8897e79973/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.0-20170417170307-b6cb39589372/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v0.0.0-20170417173400-9e4c21054fa1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/src-d/gcfg v1.4.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.starlark.net v0.0.0-20190702223751-32f345186213/go.mod h1:c1/X6cHgvdXj6pUlmWKMkuqRnW4K8x2vwt6JAaaircg= go.starlark.net v0.0.0-20200203144150-6677ee5c7211/go.mod h1:nmDLcffg48OtT/PSW0Hg7FvpRQsQh5OSqIylirxKC7o= golang.org/x/arch v0.0.0-20190927153633-4e8777c89be4/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/arch v0.0.0-20191126211547-368ea8f32fff/go.mod h1:flIaEI6LNU6xOCD5PaJvn9wGP0agmIOqjrtsKGRguv4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200214034016-1d94cc7ab1c6/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975 h1:/Tl7pH94bvbAAHBdZJT947M/+gp0+CqQXDtMRC0fseo= +golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80 h1:Ao/3l156eZf2AW5wK8a7/smtodRU+gha3+BeqJ69lRk= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9 h1:rjwSpXsdiK0dV8/Naq3kAw9ymfAeJIyd0upUIElB+lI= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120 h1:EZ3cVSzKOlJxAd8e8YAJ7no8nNypTxexh/YE/xW3ZEY= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190710143415-6ec70d6a5542/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191002063906-3421d5a6bb1c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4 h1:sfkvUWPNGwSV+8/fNqctR5lS2AqCSqYwXdrjCxp/dXo= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190729092621-ff9f1409240a/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20191127201027-ecd32218bd7f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b h1:lohp5blsw53GBXtLyLNaTXPXS9pJ1tiTw61ZHUoE9Qw= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb h1:i1Ppqkc3WQXikh8bXiwHqAN5Rv3/qDCcRk0/Otx73BY= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.22.0 h1:J0UbZOIrCAl+fpTOf8YLs4dJo8L/owV4LYVtAXQoPkw= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0 h1:AzbTB6ux+okLTzP8Ru1Xs41C303zdcfEht7MQnYJt5A= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/src-d/go-billy.v4 v4.3.2/go.mod h1:nDjArDMp+XMs1aFAESLRjfGSgfvoYN0hDfzEk0GjC98= +gopkg.in/src-d/go-git-fixtures.v3 v3.5.0/go.mod h1:dLBcvytrw/TYZsNTWCnkNF2DSIlzWYqTe3rJR56Ac7g= +gopkg.in/src-d/go-git.v4 v4.13.1/go.mod h1:nx5NYcxdKxq5fpltdHnPa2Exj4Sx0EclMWZQbYDu2z8= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/api v0.16.8 h1:T72itM0CUT8KHqPAqbjTeSY0n24RyVM71nLiMlq/cAw= +k8s.io/api v0.16.8/go.mod h1:a8EOdYHO8en+YHhPBLiW5q+3RfHTr7wxTqqp7emJ7PM= +k8s.io/apimachinery v0.16.8 h1:wgFRqtel3w3rcclpba+iBkVlKeBlh42OzNp7FalXVCg= +k8s.io/apimachinery v0.16.8/go.mod h1:Xk2vD2TRRpuWYLQNM6lT9R7DSFZUYG03SarNkbGrnKE= +k8s.io/client-go v0.16.8 h1:CmsQXJpSWq1aUyQ5Lp/rRPiMK2OYfJv32Ftl0D1D42U= +k8s.io/client-go v0.16.8/go.mod h1:WmPuN0yJTKHXoklExKxzo3jSXmr3EnN+65uaTb5VuNs= +k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20190801114015-581e00157fb1 h1:+ySTxfHnfzZb9ys375PXNlLhkJPLKgHajBU0N62BDvE= +k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= +sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= diff --git a/app/platform/fabric/e2e-test/specs/runexplorer.sh b/app/platform/fabric/e2e-test/specs/runexplorer.sh index d6478db26..7d45a1ce7 100755 --- a/app/platform/fabric/e2e-test/specs/runexplorer.sh +++ b/app/platform/fabric/e2e-test/specs/runexplorer.sh @@ -45,7 +45,7 @@ done echo "#### Started DB container" rm -rf logs wallet - + export LOG_LEVEL_CONSOLE=debug export EXPLORER_SYNC_BLOCKSYNCTIME_SEC=5 ./start.sh diff --git a/app/platform/fabric/e2e-test/specs/templates/configtx.yaml b/app/platform/fabric/e2e-test/specs/templates-v1/configtx.yaml similarity index 100% rename from app/platform/fabric/e2e-test/specs/templates/configtx.yaml rename to app/platform/fabric/e2e-test/specs/templates-v1/configtx.yaml diff --git a/app/platform/fabric/e2e-test/specs/templates/crypto-config.yaml b/app/platform/fabric/e2e-test/specs/templates-v1/crypto-config.yaml similarity index 100% rename from app/platform/fabric/e2e-test/specs/templates/crypto-config.yaml rename to app/platform/fabric/e2e-test/specs/templates-v1/crypto-config.yaml diff --git a/app/platform/fabric/e2e-test/specs/templates/docker/docker-compose.yaml b/app/platform/fabric/e2e-test/specs/templates-v1/docker/docker-compose.yaml similarity index 100% rename from app/platform/fabric/e2e-test/specs/templates/docker/docker-compose.yaml rename to app/platform/fabric/e2e-test/specs/templates-v1/docker/docker-compose.yaml diff --git a/app/platform/fabric/e2e-test/specs/templates-v1/input.yaml b/app/platform/fabric/e2e-test/specs/templates-v1/input.yaml new file mode 100644 index 000000000..6473f0580 --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/templates-v1/input.yaml @@ -0,0 +1,134 @@ +#@data/values +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 +--- + dockerOrg: hyperledger + dockerTag: 2.1.1 + + #! peer database ledger type (couchdb, goleveldb) + dbType: couchdb + #! This parameter is used to define fabric logging spec in peers + peerFabricLoggingSpec: error + #! This parameter is used to define fabric logging spec in orderers + ordererFabricLoggingSpec: error + #! tls in the network (true, false or mutual(mutualtls)) + tls: true + #! fabric metrics with prometheus (true/false) + metrics: false + #! true - enable gossip and dynamic leader election + #! false - disable gossip and set all peers as org leaders + gossipEnable: false + #! enable node ou's in fabric network (true/false) + enableNodeOUs: true + + #! For smoke test suite, crypto-config, connection-profile and channel-artifacts are stored + #! in smoke directory + orderer: + + #! Consensus type + ordererType: etcdraft + batchSize: + maxMessageCount: 100 + absoluteMaxBytes: 10 MB + preferredMaxBytes: 2 MB + batchTimeOut: 2s + #! Etcd raft options and this will be used when ordererType is + #! selected as etcdraft + etcdraftOptions: + tickInterval: 500ms + electionTick: 10 + heartbeatTick: 1 + maxInflightBlocks: 5 + snapshotIntervalSize: 100 MB + + #! Not being used for smoke test suite + #! Number of kafka and zookeeper to be launched in network + #! when ordererType is kafka + kafka: + numKafka: 5 + #! number of kafka replications for each channel + numKafkaReplications: 3 + numZookeepers: 3 + + ordererOrganizations: + - name: ordererorg1 + mspId: OrdererOrgExampleCom + numOderers: 1 + numCa: 0 + + peerOrganizations: + - name: org1 + mspId: Org1ExampleCom + numPeers: 1 + numCa: 1 + + - name: org2 + mspId: Org2ExampleCom + numPeers: 1 + numCa: 1 + + #! Capabilites for Orderer, Channel, Application groups + ordererCapabilities: V2_0 + + channelCapabilities: V2_0 + + applicationCapabilities: V2_0 + + #! Create the channel creation transactions; every org will be included in every channel + #! This used testorgschannel as the prefix and channels are used like testorgschannel0, + #! testorgschannel1.... based on number of channels passed + #! (note: client will need to submit the transactions to create channels) + numChannels: 1 + + #! Not being used for smoke test suite + k8s: + serviceType: NodePort + #! dataPersistence is used to store the data from fabric containers + #! It can take values of true, false and local + #! When true is used, it uses storageClass and storageCapacity to create + #! persistent volumes. When false is used, backup will not be configured. + #! When local is used, hostPath will be used to store the data from fabric containers + #! to worker nodes on which pods are running. + dataPersistence: false + storageClass: default + storageCapacity: 20Gi + resources: + orderers: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: "0.5" + memory: 1Gi + peers: + limits: + cpu: "0.5" + memory: 2Gi + requests: + cpu: "0.5" + memory: 2Gi + #! dind will be used to run all chaincode containers of a peer + dind: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: "1" + memory: 1Gi + couchdb: + limits: + cpu: "0.2" + memory: 1Gi + requests: + cpu: "0.1" + memory: 1Gi + kafka: + limits: + cpu: "0.2" + memory: 1Gi + requests: + cpu: "0.1" + memory: 1Gi + artifactsLocation: /home/atsushi/dev/hyperledger/blockchain-explorer/app/platform/fabric/e2e-test/specs +nodeportIP: diff --git a/app/platform/fabric/e2e-test/specs/templates/k8s/fabric-k8s-pods.yaml b/app/platform/fabric/e2e-test/specs/templates-v1/k8s/fabric-k8s-pods.yaml similarity index 100% rename from app/platform/fabric/e2e-test/specs/templates/k8s/fabric-k8s-pods.yaml rename to app/platform/fabric/e2e-test/specs/templates-v1/k8s/fabric-k8s-pods.yaml diff --git a/app/platform/fabric/e2e-test/specs/templates/k8s/fabric-k8s-pvc.yaml b/app/platform/fabric/e2e-test/specs/templates-v1/k8s/fabric-k8s-pvc.yaml similarity index 100% rename from app/platform/fabric/e2e-test/specs/templates/k8s/fabric-k8s-pvc.yaml rename to app/platform/fabric/e2e-test/specs/templates-v1/k8s/fabric-k8s-pvc.yaml diff --git a/app/platform/fabric/e2e-test/specs/templates/k8s/fabric-k8s-service.yaml b/app/platform/fabric/e2e-test/specs/templates-v1/k8s/fabric-k8s-service.yaml similarity index 100% rename from app/platform/fabric/e2e-test/specs/templates/k8s/fabric-k8s-service.yaml rename to app/platform/fabric/e2e-test/specs/templates-v1/k8s/fabric-k8s-service.yaml diff --git a/app/platform/fabric/e2e-test/specs/templates-v2/configtx.yaml b/app/platform/fabric/e2e-test/specs/templates-v2/configtx.yaml new file mode 100644 index 000000000..f14c4a9f8 --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/templates-v2/configtx.yaml @@ -0,0 +1,164 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +#@ load("@ytt:data", "data") +#@ def orgPolicies(mspId, type, nodeOUs, capability): +#@ output = {} +#@ if nodeOUs: +#@ readwriteset = {"Type": "Signature", "Rule": "OR('{}.admin', '{}.{}', '{}.client')".format(mspId, mspId, type, mspId)} +#@ admins = {"Type": "Signature", "Rule": "OR('{}.admin')".format(mspId)} +#@ else: +#@ readwriteset = {"Type": "Signature", "Rule": "OR('{}.member')".format(mspId, mspId, type, mspId)} +#@ admins = {"Type": "Signature", "Rule": "OR('{}.member')".format(mspId)} +#@ end +#@ output = {"Readers": readwriteset, "Writers": readwriteset, "Admins": admins} +#@ if type == "peer" and capability == "V2_0": +#@ if nodeOUs: +#@ endorsement = {"Type": "Signature", "Rule": "OR('{}.peer')".format(mspId)} +#@ else: +#@ endorsement = {"Type": "Signature", "Rule": "OR('{}.member')".format(mspId)} +#@ end +#@ output = {"Readers": readwriteset, "Writers": readwriteset, "Admins": admins, "Endorsement": endorsement} +#@ end +#@ return output +#@ end + +#@ def orgOrderers(ordererOrg, port, config): +#@ orderers = [] +#@ for i in range(0, ordererOrg.numOderers): +#@ if config.nodeportIP: +#@ orderers.append("{}:{}".format(config.nodeportIP, port)) +#@ else: +#@ orderers.append("orderer{}-{}:{}".format(i, ordererOrg.name, port)) +#@ end +#@ port += 1 +#@ end +#@ return orderers +#@ end + +#@ def anchorPeers(orgName, port): +#@ anchorpeers = [] +#@ anchorpeers.append({"Host": "peer0-{}".format(orgName), "Port": port}) +#@ return anchorpeers +#@ end + +#@ def organizations(config, type): +#@ output = [] +#@ artifactsLocation = config.artifactsLocation +#@ if artifactsLocation.endswith("/") == False: +#@ artifactsLocation = artifactsLocation + "/" +#@ end +#@ if type == "orderer": +#@ port1 = 30000 +#@ num_organizations = len(config.ordererOrganizations) +#@ for i in range(0, num_organizations): +#@ output.append({"Name": config.ordererOrganizations[i].name, "OrdererEndpoints": orgOrderers(config.ordererOrganizations[i], port1, config), "ID": config.ordererOrganizations[i].mspId, "MSPDir": artifactsLocation+"crypto-config/ordererOrganizations/"+config.ordererOrganizations[i].name+"/msp", "Policies": orgPolicies(config.ordererOrganizations[i].mspId, "orderer", config.enableNodeOUs, "")}) +#@ port1 += config.ordererOrganizations[i].numOderers +#@ end +#@ end +#@ if type == "peer": +#@ port2 = 31000 +#@ capability = config.applicationCapabilities +#@ for i in range(0, len(config.peerOrganizations)): +#@ output.append({"Name": config.peerOrganizations[i].name, "AnchorPeers": anchorPeers(config.peerOrganizations[i].name, port2),"ID": config.peerOrganizations[i].mspId, "MSPDir": artifactsLocation+"crypto-config/peerOrganizations/"+config.peerOrganizations[i].name+"/msp", "Policies": orgPolicies(config.peerOrganizations[i].mspId, "peer", config.enableNodeOUs, capability)}) +#@ port2 += config.peerOrganizations[i].numPeers +#@ end +#@ end +#@ return output +#@ end + +#@ def policies(type, capability): +#@ readers = {"Type": "ImplicitMeta", "Rule": "ANY Readers"} +#@ writers = {"Type": "ImplicitMeta", "Rule": "ANY Writers"} +#@ admins = {"Type": "ImplicitMeta", "Rule": "ANY Admins"} +#@ output = {} +#@ if type == "orderer": +#@ blockValidation = {"Type": "ImplicitMeta", "Rule": "ANY Writers"} +#@ output = {"Readers": readers, "Writers": writers, "Admins": admins, "BlockValidation": blockValidation} +#@ else: +#@ output = {"Readers": readers, "Writers": writers, "Admins": admins} +#@ if capability == "V2_0": +#@ endorsement = {"Type": "ImplicitMeta", "Rule": "ANY Endorsement"} +#@ lifecycleendorsement = {"Type": "ImplicitMeta", "Rule": "ANY Endorsement"} +#@ output = {"Readers": readers, "Writers": writers, "Admins": admins, "Endorsement": endorsement, "LifecycleEndorsement": lifecycleendorsement} +#@ end +#@ end +#@ return output +#@ end + +#@ def ordererHosts(config): +#@ result = [] +#@ port1 = 30000 +#@ num_organizations = len(config.ordererOrganizations) +#@ for i in range(0, num_organizations): +#@ ordererOrg = config.ordererOrganizations[i] +#@ numOderers = ordererOrg.numOderers +#@ for j in range(0, numOderers): +#@ result.append("orderer"+str(j)+"-"+ordererOrg.name+":{}".format(port1)) +#@ port1 += 1 +#@ end +#@ end +#@ return result +#@ end + +#@ def orderer(config): +#@ result = {} +#@ batch_size_options = config.orderer.batchSize +#@ artifactsLocation = config.artifactsLocation +#@ if artifactsLocation.endswith("/") == False: +#@ artifactsLocation = artifactsLocation + "/" +#@ end +#@ batchSize = {"MaxMessageCount": batch_size_options.maxMessageCount, "AbsoluteMaxBytes": batch_size_options.absoluteMaxBytes, "PreferredMaxBytes": batch_size_options.preferredMaxBytes} +#@ if(config.orderer.ordererType=="etcdraft"): +#@ consenters = [] +#@ port1 = 30000 +#@ etcd_options = config.orderer.etcdraftOptions +#@ for i in range(0, len(config.ordererOrganizations)): +#@ for j in range(0, config.ordererOrganizations[i].numOderers): +#@ ordererOrg = config.ordererOrganizations[i] +#@ certs = "{}crypto-config/ordererOrganizations/{}/orderers/orderer{}-{}.{}/tls/server.crt".format(artifactsLocation, ordererOrg.name, j, ordererOrg.name, ordererOrg.name) +#@ consenters.append({"Host":"orderer{}-{}".format(j, ordererOrg.name), "Port": port1, "ClientTLSCert": certs, "ServerTLSCert": certs}) +#@ port1 += 1 +#@ end +#@ end +#@ options = {"TickInterval": etcd_options.tickInterval, "ElectionTick": etcd_options.electionTick, "HeartbeatTick": etcd_options.heartbeatTick, "MaxInflightBlocks": etcd_options.maxInflightBlocks, "SnapshotIntervalSize": etcd_options.snapshotIntervalSize} +#@ result = {"OrdererType": config.orderer.ordererType, "Addresses": ordererHosts(config), "BatchTimeout": config.orderer.batchTimeOut, "BatchSize": batchSize, "Organizations": organizations(config, "orderer"), "Policies": policies("orderer", ""), "Capabilities": capabilities(config.ordererCapabilities), "EtcdRaft":{"Consenters":consenters, "Options":options}} +#@ elif (config.orderer.ordererType == "kafka"): +#@ brokersList = [] +#@ kafka = {} +#@ for i in range(0, config.kafka.numKafka): +#@ brokersList.append("kafka{}:9092".format(i)) +#@ end +#@ kafka = {"Brokers": brokersList} +#@ result = {"OrdererType": config.orderer.ordererType, "Addresses": ordererHosts(config), "BatchTimeout": config.orderer.batchTimeOut, "BatchSize": batchSize, "kafka": kafka, "Organizations": organizations(config, "orderer"),"Policies": policies("orderer", ""),"Capabilities": capabilities(config.ordererCapabilities)} +#@ else: +#@ result = {"OrdererType": config.orderer.ordererType, "Addresses": ordererHosts(config), "BatchTimeout": config.orderer.batchTimeOut, "BatchSize": batchSize, "Organizations": organizations(config, "orderer"), "Policies": policies("orderer", ""), "Capabilities": capabilities(config.ordererCapabilities)} +#@ end +#@ return result +#@ end + +#@ def capabilities(value): +#@ output = [] +#@ output.append({value: "true"}) +#@ return output[0] +#@ end +#@ config = data.values + +Profiles: + testorgschannel: + Policies: #@ policies("channel", "") + Capabilities: #@ capabilities(config.channelCapabilities) + Consortium: FabricConsortium + Application: + Organizations: #@ organizations(config, "peer") + Policies: #@ policies("peer", config.applicationCapabilities) + Capabilities: #@ capabilities(config.applicationCapabilities) + Orderer: #@ orderer(config) + testOrgsOrdererGenesis: + Policies: #@ policies("channel", "") + Capabilities: #@ capabilities(config.channelCapabilities) + Orderer: #@ orderer(config) + Consortiums: + FabricConsortium: + Organizations: #@ organizations(config, "peer") \ No newline at end of file diff --git a/app/platform/fabric/e2e-test/specs/templates-v2/crypto-config.yaml b/app/platform/fabric/e2e-test/specs/templates-v2/crypto-config.yaml new file mode 100755 index 000000000..90e9c1525 --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/templates-v2/crypto-config.yaml @@ -0,0 +1,41 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +#@ load("@ytt:data", "data") +#@ config = data.values +#@ localIP = "127.0.0.1" +OrdererOrgs: +#@ num_organizations = len(config.ordererOrganizations) +#@ for i in range(0, num_organizations): +#@ ordererOrg = config.ordererOrganizations[i] +- Domain: #@ ordererOrg.name + Name: #@ ordererOrg.name + EnableNodeOUs: #@ config.enableNodeOUs + Specs: + #@ numOderers = ordererOrg.numOderers + #@ for i in range(0, numOderers): + - Hostname: #@ "orderer{}-{}".format(i, ordererOrg.name) + SANS: + - #@ "{}".format(localIP) + #@ if config.nodeportIP != "": + - #@ config.nodeportIP + #@ end + #@ end +#@ end +PeerOrgs: +#@ for i in range(0, len(config.peerOrganizations)): +#@ peerOrg = config.peerOrganizations[i] +- Domain: #@ peerOrg.name + Name: #@ peerOrg.name + EnableNodeOUs: #@ config.enableNodeOUs + Specs: + #@ for i in range(0, peerOrg.numPeers): + - Hostname: #@ "peer{}-{}".format(i, peerOrg.name) + SANS: + - #@ "{}".format(localIP) + #@ if config.nodeportIP != "": + - #@ config.nodeportIP + #@ end + #@ end +#@ end \ No newline at end of file diff --git a/app/platform/fabric/e2e-test/specs/templates-v2/docker/docker-compose.yaml b/app/platform/fabric/e2e-test/specs/templates-v2/docker/docker-compose.yaml new file mode 100644 index 000000000..5f4d9fa63 --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/templates-v2/docker/docker-compose.yaml @@ -0,0 +1,262 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +#@ load("@ytt:data", "data") +#@ services = {} + +#@ def validateAttributeExists(config, image): +#@ return hasattr(config, "dockerImages") and hasattr(config.dockerImages, image) +#@ end + +#@ def caList(config): +#@ caUniquePort = 32000 +#@ for i in range(0, len(config.peerOrganizations)): +#@ org = config.peerOrganizations[i] +#@ for j in range(0, org.numCa): +#@ container_name = "ca{}-{}".format(j, org.name) +#@ services[container_name] = ca(container_name, caUniquePort, "peer", org.name, config) +#@ caUniquePort += 1 +#@ end +#@ end +#@ for i in range(0, len(config.ordererOrganizations)): +#@ org = config.ordererOrganizations[i] +#@ for j in range(0, org.numCa): +#@ container_name = "ca{}-{}".format(j, org.name) +#@ services[container_name] = ca(container_name, caUniquePort, "orderer", org.name, config) +#@ caUniquePort += 1 +#@ end +#@ end +#@ end + +#@ def couchDB(config): +#@ couchDBUniquePort = 33000 +#@ for i in range(0, len(config.peerOrganizations)): +#@ org = config.peerOrganizations[i] +#@ for j in range(0, org.numPeers): +#@ container_name = "couchdb-peer{}-{}".format(j, org.name) +#@ services[container_name] = {"container_name":container_name, "image":"hyperledger/fabric-couchdb", "ports":["{}:5984".format(couchDBUniquePort)]} +#@ couchDBUniquePort += 1 +#@ end +#@ end +#@ end + +#@ def ca(container_name, caUniquePort, type, orgName, config): +#@ orgType = "{}Organizations".format(type) +#@ image = "" +#@ if validateAttributeExists(config, "ca"): +#@ image = config.dockerImages.ca +#@ else: +#@ image = "{}/fabric-ca:{}".format(config.dockerOrg, config.dockerTag) +#@ end +#@ env = ["FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server"] +#@ env.append("FABRIC_CA_SERVER_CA_NAME={}".format(container_name)) +#@ env.append("FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca/ca.{}-cert.pem".format(orgName)) +#@ env.append("FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/ca/ca-priv_sk") +#@ if config.tls == "mutual": +#@ env.append("FABRIC_CA_SERVER_TLS_ENABLED=true") +#@ else: +#@ env.append("FABRIC_CA_SERVER_TLS_ENABLED={}".format(config.tls)) +#@ end +#@ env.append("FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/tlsca/tlsca.{}-cert.pem".format(orgName)) +#@ env.append("FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/tlsca/tlsca-priv_sk") +#@ ports = ["{}:{}".format(caUniquePort, 7054)] +#@ command = "sh -c 'fabric-ca-server start -b admin:adminpw -d'" +#@ volumes = ["{}crypto-config/{}/{}/ca/:/etc/hyperledger/fabric-ca-server-config/ca".format(artifactsLocation, orgType, orgName)] +#@ volumes.append("{}crypto-config/{}/{}/tlsca/:/etc/hyperledger/fabric-ca-server-config/tlsca".format(artifactsLocation, orgType, orgName)) +#@ ca = {"image":image, "environment":env, "ports":ports, "command":command, "volumes":volumes, "container_name":container_name} +#@ return ca +#@ end + +#@ def kafka_zookeepers(kafka): +#@ (zookeepers, kafka_zookeeper_connect) = ([], []) +#@ kafkaUniquePort = 2181 +#@ for i in range(0, kafka.numZookeepers): +#@ env = ["ZOO_MY_ID={}".format(i+1), "ZOO_PORT={}".format(kafkaUniquePort), "ZOO_SERVERS={}".format(zookeeper_servers(kafka.numZookeepers))] +#@ expose = [kafkaUniquePort, kafkaUniquePort+1, kafkaUniquePort+2] +#@ container_name = "zookeeper{}".format(i) +#@ zookeepers.append(container_name) +#@ kafka_zookeeper_connect.append("{}:{}".format(container_name, kafkaUniquePort)) +#@ services[container_name] = {"image":"hyperledger/fabric-zookeeper", "environment":env, "expose":expose, "container_name":container_name} +#@ kafkaUniquePort += 1000 +#@ end +#@ kafkaUniquePort = 9092 +#@ for i in range(0, kafka.numKafka): +#@ container_name = "kafka{}".format(i) +#@ env = ["KAFKA_BROKER_ID={}".format(i), "KAFKA_DEFAULT_REPLICATION_FACTOR={}".format(kafka.numKafkaReplications), "KAFKA_MESSAGE_MAX_BYTES=103809024", "KAFKA_REPLICA_FETCH_MAX_BYTES=103809024"] +#@ env.append("KAFKA_ZOOKEEPER_CONNECT={}".format(",".join(kafka_zookeeper_connect))) +#@ env.append("KAFKA_MIN_INSYNC_REPLICAS=2") +#@ env.append("KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE=false") +#@ services[container_name] = {"image":"hyperledger/fabric-kafka", "environment":env, "depends_on":zookeepers, "container_name":container_name, "ports":["{}:{}".format(kafkaUniquePort+i,kafkaUniquePort)]} +#@ end +#@ end + +#@ def zookeeper_servers(numZookeepers): +#@ servers = [] +#@ zookeeperUniquePort = 2181 +#@ for i in range(0, numZookeepers): +#@ servers.append("server.{}=zookeeper{}:{}:{}:participant".format(i+1, i, zookeeperUniquePort+1, zookeeperUniquePort+2)) +#@ zookeeperUniquePort += 1000 +#@ end +#@ return " ".join(servers) +#@ end + +#@ def kafkaList(numKafka): +#@ kafka_list = [] +#@ for i in range(0, numKafka): +#@ kafka_list.append("kafka{}".format(i)) +#@ end +#@ return kafka_list +#@ end + +#@ def mutualTLS(config): +#@ output = [] +#@ for i in range(0, len(config.peerOrganizations)): +#@ organization = config.peerOrganizations[i] +#@ output.append("/etc/hyperledger/fabric/artifacts/msp/crypto-config/peerOrganizations/{}/ca/ca.{}-cert.pem".format(organization.name, organization.name)) +#@ end +#@ for j in range(0, len(config.ordererOrganizations)): +#@ organization = config.ordererOrganizations[j] +#@ output.append("/etc/hyperledger/fabric/artifacts/msp/crypto-config/ordererOrganizations/{}/ca/ca.{}-cert.pem".format(organization.name, organization.name)) +#@ end +#@ return output +#@ end + +#@ def orderers(config): +#@ (ordererUniquerPort, ordererHealthCheckPort) = (30000, 30100) +#@ for i in range(0, len(config.ordererOrganizations)): +#@ org = config.ordererOrganizations[i] +#@ for j in range(0, org.numOderers): +#@ env = ["FABRIC_LOGGING_SPEC={}".format(config.ordererFabricLoggingSpec), "ORDERER_GENERAL_LISTENADDRESS=0.0.0.0", "ORDERER_GENERAL_LISTENPORT={}".format(ordererUniquerPort), "ORDERER_GENERAL_GENESISMETHOD=file"] +#@ env.append("ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/fabric/artifacts/msp/channel-artifacts/genesis.block") +#@ env.append("ORDERER_GENERAL_LOCALMSPID={}".format(org.mspId)) +#@ env.append("ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/fabric/artifacts/msp/crypto-config/ordererOrganizations/{}/orderers/orderer{}-{}.{}/msp".format(org.name, j, org.name, org.name)) +#@ if config.tls == "mutual": +#@ env.append("ORDERER_GENERAL_TLS_CLIENTROOTCAS=[{}]".format(", ".join(mutualTLS(config)))) +#@ env.append("ORDERER_GENERAL_TLS_CLIENTAUTHREQUIRED=true") +#@ env.append("ORDERER_GENERAL_TLS_ENABLED=true") +#@ else: +#@ env.append("ORDERER_GENERAL_TLS_ENABLED={}".format(config.tls)) +#@ end +#@ env.append("ORDERER_OPERATIONS_LISTENADDRESS=0.0.0.0:8443") +#@ env.append("ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/fabric/artifacts/msp/crypto-config/ordererOrganizations/{}/orderers/orderer{}-{}.{}/tls/server.key".format(org.name, j, org.name, org.name)) +#@ env.append("ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/fabric/artifacts/msp/crypto-config/ordererOrganizations/{}/orderers/orderer{}-{}.{}/tls/server.crt".format(org.name, j, org.name, org.name)) +#@ env.append("ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/fabric/artifacts/msp/crypto-config/ordererOrganizations/{}/orderers/orderer{}-{}.{}/tls/server.crt]".format(org.name, j, org.name, org.name)) +#@ env.append("ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY=/etc/hyperledger/fabric/artifacts/msp/crypto-config/ordererOrganizations/{}/orderers/orderer{}-{}.{}/tls/server.key".format(org.name, j, org.name, org.name)) +#@ env.append("ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE=/etc/hyperledger/fabric/artifacts/msp/crypto-config/ordererOrganizations/{}/orderers/orderer{}-{}.{}/tls/server.crt".format(org.name, j, org.name, org.name)) +#@ volumes = ["{}:/etc/hyperledger/fabric/artifacts/msp/".format(artifactsLocation)] +#@ volumes.append("{}/backup/orderer{}-{}:/var/hyperledger/production/orderer".format(artifactsLocation, j, org.name)) +#@ container_name = "orderer{}-{}".format(j,org.name) +#@ image = "" +#@ if validateAttributeExists(config, "orderer"): +#@ image = config.dockerImages.orderer +#@ else: +#@ image = "{}/fabric-orderer:{}".format(config.dockerOrg, config.dockerTag) +#@ end +#@ ports = ["{}:{}".format(ordererUniquerPort,ordererUniquerPort), "{}:{}".format(ordererHealthCheckPort,8443)] +#@ services[container_name] = {"image":image, "environment":env, "working_dir":"/opt/gopath/src/github.com/hyperledger/fabric", "command":"orderer", "volumes":volumes, "ports":ports, "container_name":container_name} +#@ if config.orderer.ordererType == "kafka": +#@ services[container_name] = {"image":image, "environment":env, "working_dir":"/opt/gopath/src/github.com/hyperledger/fabric", "command":"orderer", "volumes":volumes, "ports":ports, "container_name":container_name, "depends_on":kafkaList(config.kafka.numKafka)} +#@ end +#@ ordererUniquerPort += 1 +#@ ordererHealthCheckPort += 1 +#@ end +#@ end +#@ end + +#@ def peers(config): +#@ (peerUniquerPort, peerHealthCheckPort) = (31000, 31100) +#@ for i in range(0, len(config.peerOrganizations)): +#@ org = config.peerOrganizations[i] +#@ for j in range(0, org.numPeers): +#@ env = ["CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock", "FABRIC_LOGGING_SPEC={}".format(config.peerFabricLoggingSpec), "CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=configfiles_default"] +#@ if config.gossipEnable == True: +#@ env.append("CORE_PEER_GOSSIP_STATE_ENABLED=true") +#@ env.append("CORE_PEER_GOSSIP_ORGLEADER=false") +#@ env.append("CORE_PEER_GOSSIP_USELEADERELECTION=true") +#@ else: +#@ env.append("CORE_PEER_GOSSIP_STATE_ENABLED=false") +#@ env.append("CORE_PEER_GOSSIP_ORGLEADER=true") +#@ env.append("CORE_PEER_GOSSIP_USELEADERELECTION=false") +#@ end +#@ env.append("CORE_PEER_GOSSIP_BOOTSTRAP=127.0.0.1:{}".format(peerUniquerPort)) +#@ env.append("CORE_PEER_GOSSIP_ENDPOINT=peer{}-{}:{}".format(j, org.name, peerUniquerPort)) +#@ env.append("CORE_PEER_LISTENADDRESS=0.0.0.0:{}".format(peerUniquerPort)) +#@ env.append("CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:{}".format(7052)) +#@ env.append("CORE_CHAINCODE_EXECUTETIMEOUT=1500s") +#@ env.append("CORE_PEER_ID=peer{}-{}".format(j, org.name)) +#@ env.append("CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/fabric/artifacts/msp/crypto-config/peerOrganizations/{}/peers/peer{}-{}.{}/msp".format(org.name, j, org.name, org.name)) +#@ env.append("CORE_PEER_LOCALMSPID={}".format(org.mspId)) +#@ env.append("CORE_PEER_ADDRESS=peer{}-{}:{}".format(j, org.name, peerUniquerPort)) +#@ env.append("CORE_OPERATIONS_LISTENADDRESS=0.0.0.0:9443") +#@ env.append("CORE_PEER_CHAINCODEADDRESS=peer{}-{}:{}".format(j, org.name, 7052)) +#@ env.append("CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer{}-{}:{}".format(j, org.name, peerUniquerPort)) +#@ if config.tls == "mutual": +#@ env.append("CORE_PEER_TLS_CLIENTROOTCAS_FILES={}".format(" ".join(mutualTLS(config)))) +#@ env.append("CORE_PEER_TLS_CLIENTAUTHREQUIRED=true") +#@ env.append("CORE_PEER_TLS_ENABLED=true") +#@ else: +#@ env.append("CORE_PEER_TLS_ENABLED={}".format(config.tls)) +#@ end +#@ env.append("CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/artifacts/msp/crypto-config/peerOrganizations/{}/peers/peer{}-{}.{}/tls/server.crt".format(org.name, j, org.name, org.name)) +#@ env.append("CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/artifacts/msp/crypto-config/peerOrganizations/{}/peers/peer{}-{}.{}/tls/server.key".format(org.name, j, org.name, org.name)) +#@ env.append("CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/artifacts/msp/crypto-config/peerOrganizations/{}/peers/peer{}-{}.{}/tls/ca.crt".format(org.name, j, org.name, org.name)) +#@ container_name = "peer{}-{}".format(j, org.name) +#@ volumes = ["{}:/etc/hyperledger/fabric/artifacts/msp/".format(artifactsLocation)] +#@ volumes.append("/var/run/:/host/var/run/") +#@ volumes.append("{}/backup/peer{}-{}:/var/hyperledger/production".format(artifactsLocation,j, org.name)) +#@ image = "" +#@ if validateAttributeExists(config, "peer"): +#@ image = config.dockerImages.peer +#@ else: +#@ image = "{}/fabric-peer:{}".format(config.dockerOrg, config.dockerTag) +#@ end +#@ if validateAttributeExists(config, "ccenv"): +#@ env.append("CORE_CHAINCODE_BUILDER={}".format(config.dockerImages.ccenv)) +#@ else: +#@ env.append("CORE_CHAINCODE_BUILDER={}/fabric-ccenv:{}".format(config.dockerOrg, config.dockerTag)) +#@ end +#@ if validateAttributeExists(config, "baseos"): +#@ env.append("CORE_CHAINCODE_GOLANG_RUNTIME={}".format(config.dockerImages.baseos)) +#@ else: +#@ env.append("CORE_CHAINCODE_GOLANG_RUNTIME={}/fabric-baseos:{}".format(config.dockerOrg, config.dockerTag)) +#@ end +#@ if validateAttributeExists(config, "javaenv"): +#@ env.append("CORE_CHAINCODE_JAVA_RUNTIME={}".format(config.dockerImages.javaenv)) +#@ else: +#@ env.append("CORE_CHAINCODE_JAVA_RUNTIME={}/fabric-javaenv:{}".format(config.dockerOrg, config.dockerTag)) +#@ end +#@ if validateAttributeExists(config, "nodeenv"): +#@ env.append("CORE_CHAINCODE_NODE_RUNTIME={}".format(config.dockerImages.nodeenv)) +#@ else: +#@ env.append("CORE_CHAINCODE_NODE_RUNTIME={}/fabric-nodeenv:{}".format(config.dockerOrg, config.dockerTag)) +#@ end +#@ ports = ["7051", "{}:{}".format(peerUniquerPort,peerUniquerPort), "{}:{}".format(peerHealthCheckPort,9443)] +#@ services[container_name] = {"image":image, "environment":env, "volumes":volumes, "ports":ports, "working_dir":"/opt/gopath/src/github.com/hyperledger/fabric/peer", "command":"peer node start", "container_name":container_name} +#@ if config.dbType == "couchdb": +#@ env.append("CORE_LEDGER_STATE_STATEDATABASE=CouchDB") +#@ env.append("CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb-{}:5984".format(container_name)) +#@ services[container_name] = {"image":image, "environment":env, "volumes":volumes, "ports":ports, "working_dir":"/opt/gopath/src/github.com/hyperledger/fabric/peer", "command":"peer node start", "container_name":container_name, "depends_on":["couchdb-{}".format(container_name)]} +#@ end +#@ peerUniquerPort += 1 +#@ peerHealthCheckPort += 1 +#@ end +#@ end +#@ end + +#@ config = data.values +#@ artifactsLocation = config.artifactsLocation +#@ if artifactsLocation.endswith("/") == False: +#@ artifactsLocation = artifactsLocation + "/" +#@ end +version: '2' +#@ caList(config) +#@ if config.orderer.ordererType == "kafka": +#@ kafka_zookeepers(config.kafka) +#@ end +#@ if config.dbType == "couchdb": +#@ couchDB(config) +#@ end +#@ peers(config) +#@ orderers(config) +services: #@ services \ No newline at end of file diff --git a/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-pods.yaml b/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-pods.yaml new file mode 100755 index 000000000..96e928db8 --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-pods.yaml @@ -0,0 +1,437 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +#@ load("@ytt:data", "data") + +#@ def validateAttributeExists(config, image): +#@ return hasattr(config, "dockerImages") and hasattr(config.dockerImages, image) +#@ end + +#@ def zkContainers(input, id, zklist, config): +#@ id = id + 1 +#@ env = [{ "name": "ZOO_MY_ID", "value": "{}".format(id)}] +#@ env.append({"name": "ZOO_SERVERS", "value": "{}".format(zklist)}) +#@ env.append({"name": "ZOO_TICK_TIME", "value": "2000"}) +#@ env.append({"name": "ZOO_INIT_LIMIT", "value": "10"}) +#@ env.append({"name": "ZOO_SYNC_LIMIT", "value": "2"}) +#@ resources = {"limits": {"cpu": "0.2", "memory": "0.4Gi"}, "requests": {"cpu": "0.1", "memory": "0.2Gi"}} +#@ output = [] +#@ if config.k8s.dataPersistence == True: +#@ output = [{"volumeMounts": [{"mountPath": "/data", "name": "zookeeper-data-storage"}], "name": input, "image": "hyperledger/fabric-zookeeper", "imagePullPolicy": "Always", "env": env, "resources": resources}] +#@ else: +#@ output = [{"name": input, "image": "hyperledger/fabric-zookeeper", "imagePullPolicy": "Always", "env": env, "resources": resources}] +#@ end +#@ return output +#@ end + +#@ def kafkaContainers(input, id, replicas, zklist, config): +#@ id = id + 1 +#@ env = [{ "name": "KAFKA_BROKER_ID", "value": "{}".format(id)}] +#@ env.append({"name": "KAFKA_ZOOKEEPER_CONNECT", "value": "{}".format(zklist)}) +#@ env.append({"name": "KAFKA_DEFAULT_REPLICATION_FACTOR", "value": "{}".format(replicas)}) +#@ env.append({"name": "KAFKA_MAX_REQUEST_SIZE", "value": "104857600"}) +#@ env.append({"name": "KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE", "value": "true"}) +#@ env.append({"name": "KAFKA_MIN_INSYNC_REPLICAS", "value": "2"}) +#@ env.append({"name": "KAFKA_LOG_DIRS", "value": "/opt/kafka/data" }) +#@ env.append({"name": "KAFKA_MESSAGE_MAX_BYTES", "value": "103809024"}) +#@ env.append({"name": "KAFKA_REPLICA_FETCH_MAX_BYTES", "value": "103809024"}) +#@ resources = config.k8s.resources.kafka +#@ output = [] +#@ if config.k8s.dataPersistence == True: +#@ output = [{"volumeMounts": [{"mountPath": "/opt/kafka/data", "name": "kafka-data-storage"}], "name": input, "image": "hyperledger/fabric-kafka", "imagePullPolicy": "Always", "env": env, "resources": resources}] +#@ else: +#@ output = [{"name": input, "image": "hyperledger/fabric-kafka", "imagePullPolicy": "Always", "env": env, "resources": resources}] +#@ end +#@ return output +#@ end + +#@ def mounts(type, nodeOUs): +#@ volumeMounts = [] +#@ if type == "ca": +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/", "name": "cacerts"}) +#@ else: +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/msp/admincerts/", "name": "admincerts"}) +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/msp/cacerts/", "name": "cacerts"}) +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/msp/signcerts/", "name": "signcerts"}) +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/msp/keystore/", "name": "keystore"}) +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/msp/tlscacerts/", "name": "tlscacerts"}) +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/tls/", "name": "tls"}) +#@ if nodeOUs: +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/artifacts/msp/", "name": "config"}) +#@ end +#@ end +#@ return volumeMounts +#@ end + +#@ def caContainers(input, orgName, config): +#@ ca_image = "" +#@ if validateAttributeExists(config, "ca"): +#@ ca_image = config.dockerImages.ca +#@ else: +#@ ca_image = "{}/fabric-ca:{}".format(config.dockerOrg, config.dockerTag) +#@ end +#@ env = [{"name": "FABRIC_CA_HOME", "value": "/etc/hyperledger/fabric-ca-server"}] +#@ env.append({"name": "FABRIC_CA_SERVER_CA_NAME", "value": "{}".format(input)}) +#@ env.append({"name": "FABRIC_CA_SERVER_CA_KEYFILE", "value": "/etc/hyperledger/fabric/artifacts/ca-priv_sk"}) +#@ env.append({"name": "FABRIC_CA_SERVER_CA_CERTFILE", "value": "/etc/hyperledger/fabric/artifacts/ca.{}-cert.pem".format(orgName)}) +#@ if config.tls == "mutual": +#@ env.append({"name": "FABRIC_CA_SERVER_TLS_ENABLED", "value": "true"}) +#@ else: +#@ env.append({"name": "FABRIC_CA_SERVER_TLS_ENABLED", "value": "{}".format(config.tls)}) +#@ end +#@ env.append({"name": "FABRIC_CA_SERVER_TLS_KEYFILE", "value": "/etc/hyperledger/fabric/artifacts/tlsca-priv_sk"}) +#@ env.append({"name": "FABRIC_CA_SERVER_TLS_CERTFILE", "value": "/etc/hyperledger/fabric/artifacts/tlsca.{}-cert.pem".format(orgName)}) +#@ resources = {"limits": {"cpu": "0.1", "memory": "0.2Gi"}, "requests": {"cpu": "0.1", "memory": "0.2Gi"}} +#@ volumeMounts = mounts("ca", config.enableNodeOUs) +#@ output = [{"name": input, "image": ca_image, "imagePullPolicy": "Always", "env": env, "resources": resources, "volumeMounts": volumeMounts, "command": ["fabric-ca-server"], "args": ["start", "-b", "admin: adminpw", "-d"]}] +#@ return output +#@ end + +#@ def mutualTLS(config, type): +#@ output = [] +#@ for i in range(0, len(config.peerOrganizations)): +#@ organization = config.peerOrganizations[i] +#@ if type == "clientrootca": +#@ output.append("/etc/hyperledger/fabric/artifacts/{}/ca.{}-cert.pem".format(organization.name, organization.name)) +#@ elif type == "volumeMounts": +#@ output.append({"mountPath": "/etc/hyperledger/fabric/artifacts/{}".format(organization.name), "name": "{}-clientrootca".format(organization.name)}) +#@ elif type == "volumes": +#@ output.append({"name": "{}-clientrootca".format(organization.name), "configMap": {"name": "{}-ca".format(organization.name)}}) +#@ end +#@ end +#@ for j in range(0, len(config.ordererOrganizations)): +#@ organization = config.ordererOrganizations[j] +#@ if type == "clientrootca": +#@ output.append("/etc/hyperledger/fabric/artifacts/{}/ca.{}-cert.pem".format(organization.name, organization.name)) +#@ elif type == "volumeMounts": +#@ output.append({"mountPath": "/etc/hyperledger/fabric/artifacts/{}".format(organization.name), "name": "{}-clientrootca".format(organization.name)}) +#@ elif type == "volumes": +#@ output.append({"name": "{}-clientrootca".format(organization.name), "configMap": {"name": "{}-ca".format(organization.name)}}) +#@ end +#@ end +#@ return output +#@ end + +#@ def peerContainers(input, orgName, config, mspId, peerUniquePort): +#@ endpoint = input +#@ if config.nodeportIP: +#@ endpoint = config.nodeportIP +#@ end +#@ env = [{"name": "CORE_VM_ENDPOINT", "value": "localhost:2375"}] +#@ env.append({"name": "CORE_PEER_LISTENADDRESS", "value": "0.0.0.0:{}".format(peerUniquePort)}) +#@ env.append({"name": "CORE_PEER_CHAINCODELISTENADDRESS", "value": "0.0.0.0:7052"}) +#@ if config.gossipEnable == True: +#@ env.append({"name": "CORE_PEER_GOSSIP_STATE_ENABLED", "value": "true"}) +#@ env.append({"name": "CORE_PEER_GOSSIP_USELEADERELECTION", "value": "true"}) +#@ env.append({"name": "CORE_PEER_GOSSIP_ORGLEADER", "value": "false"}) +#@ else: +#@ env.append({"name": "CORE_PEER_GOSSIP_STATE_ENABLED", "value": "false"}) +#@ env.append({"name": "CORE_PEER_GOSSIP_USELEADERELECTION", "value": "false"}) +#@ env.append({"name": "CORE_PEER_GOSSIP_ORGLEADER", "value": "true"}) +#@ end +#@ if config.tls == "mutual": +#@ env.append({"name": "CORE_PEER_TLS_CLIENTROOTCAS_FILES", "value": " ".join(mutualTLS(config, "clientrootca")) }) +#@ env.append({"name": "CORE_PEER_TLS_CLIENTAUTHREQUIRED", "value": "true"}) +#@ env.append({"name": "CORE_PEER_TLS_ENABLED", "value": "true"}) +#@ else: +#@ env.append({"name": "CORE_PEER_TLS_ENABLED", "value": "{}".format(config.tls)}) +#@ end +#@ env.append({"name": "FABRIC_LOGGING_SPEC", "value": config.peerFabricLoggingSpec}) +#@ env.append({"name": "CORE_PEER_TLS_CERT_FILE", "value": "/etc/hyperledger/fabric/artifacts/tls/server.crt"}) +#@ env.append({"name": "CORE_PEER_TLS_KEY_FILE", "value": "/etc/hyperledger/fabric/artifacts/tls/server.key"}) +#@ env.append({"name": "CORE_PEER_TLS_ROOTCERT_FILE", "value": "/etc/hyperledger/fabric/artifacts/msp/tlscacerts/tlsca.{}-cert.pem".format(orgName)}) +#@ env.append({"name": "CORE_PEER_ID", "value": "{}".format(input)}) +#@ env.append({"name": "CORE_PEER_GOSSIP_EXTERNALENDPOINT", "value": "{}:{}".format(endpoint, peerUniquePort)}) +#@ env.append({"name": "CORE_PEER_ADDRESS", "value": "{}:{}".format(input, peerUniquePort)}) +#@ env.append({"name": "CORE_PEER_CHAINCODEADDRESS", "value": "localhost:7052"}) +#@ env.append({"name": "CORE_CHAINCODE_EXECUTETIMEOUT", "value": "1500s"}) +#@ env.append({"name": "CORE_PEER_LOCALMSPID", "value": "{}".format(mspId)}) +#@ env.append({"name": "CORE_PEER_MSPCONFIGPATH", "value": "/etc/hyperledger/fabric/artifacts/msp"}) +#@ env.append({"name": "CORE_PEER_FILESYSTEMPATH", "value": "/shared/data"}) +#@ env.append({"name": "CORE_PEER_GOSSIP_BOOTSTRAP", "value": "{}:{}".format(input, peerUniquePort)}) +#@ env.append({"name": "CORE_OPERATIONS_LISTENADDRESS", "value": ":9443"}) +#@ if config.metrics == True: +#@ env.append({"name": "CORE_OPERATIONS_TLS_ENABLED", "value": "false" }) +#@ env.append({"name": "CORE_METRICS_PROVIDER", "value": "prometheus" }) +#@ end +#@ volumeMounts = mounts("peer", config.enableNodeOUs) +#@ if config.tls == "mutual": +#@ volumeMounts += mutualTLS(config, "volumeMounts") +#@ end +#@ if config.k8s.dataPersistence == True or config.k8s.dataPersistence == "local": +#@ volumeMounts.append({"mountPath": "/shared/data", "name": "peer-data-storage"}) +#@ end +#@ resources = config.k8s.resources.peers +#@ dindResources = config.k8s.resources.dind +#@ peer_image = "" +#@ if validateAttributeExists(config, "peer"): +#@ peer_image = config.dockerImages.peer +#@ else: +#@ peer_image = "{}/fabric-peer:{}".format(config.dockerOrg, config.dockerTag) +#@ end +#@ if validateAttributeExists(config, "ccenv"): +#@ env.append({"name": "CORE_CHAINCODE_BUILDER", "value": "{}".format(config.dockerImages.ccenv)}) +#@ else: +#@ env.append({"name": "CORE_CHAINCODE_BUILDER", "value": "{}/fabric-ccenv:{}".format(config.dockerOrg, config.dockerTag)}) +#@ end +#@ if validateAttributeExists(config, "baseos"): +#@ env.append({"name": "CORE_CHAINCODE_GOLANG_RUNTIME", "value": "{}".format(config.dockerImages.baseos)}) +#@ else: +#@ env.append({"name": "CORE_CHAINCODE_GOLANG_RUNTIME", "value": "{}/fabric-baseos:{}".format(config.dockerOrg, config.dockerTag)}) +#@ end +#@ if validateAttributeExists(config, "javaenv"): +#@ env.append({"name": "CORE_CHAINCODE_JAVA_RUNTIME", "value": "{}".format(config.dockerImages.javaenv)}) +#@ else: +#@ env.append({"name": "CORE_CHAINCODE_JAVA_RUNTIME", "value": "{}/fabric-javaenv:{}".format(config.dockerOrg, config.dockerTag)}) +#@ end +#@ if validateAttributeExists(config, "nodeenv"): +#@ env.append({"name": "CORE_CHAINCODE_NODE_RUNTIME", "value": "{}".format(config.dockerImages.nodeenv)}) +#@ else: +#@ env.append({"name": "CORE_CHAINCODE_NODE_RUNTIME", "value": "{}/fabric-nodeenv:{}".format(config.dockerOrg, config.dockerTag)}) +#@ end + +#@ if config.dbType == "couchdb": +#@ container = {} +#@ env.append({"name": "CORE_LEDGER_STATE_STATEDATABASE", "value": "CouchDB"}) +#@ env.append({"name": "CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS", "value": "localhost:5984"}) +#@ if config.k8s.dataPersistence == True or config.k8s.dataPersistence == "local": +#@ couchdbMount = [{"mountPath": "/opt/couchdb/data", "name": "couchdb-data-storage"}] +#@ container = {"name": "couchdb-{}".format(input), "image": "hyperledger/fabric-couchdb", "imagePullPolicy": "Always", "resources": config.k8s.resources.couchdb, "volumeMounts": couchdbMount} +#@ else: +#@ container = {"name": "couchdb-{}".format(input), "image": "hyperledger/fabric-couchdb", "imagePullPolicy": "Always", "resources": config.k8s.resources.couchdb} +#@ end +#@ output = [{"name": "dind", "image": "docker:dind", "args": ["dockerd", "-H tcp://0.0.0.0:2375"], "securityContext": {"privileged": True}, "resources": dindResources}, {"name": input, "image": peer_image, "imagePullPolicy": "Always", "env": env, "volumeMounts": volumeMounts, "command": ["peer"], "args": ["node", "start"], "resources": resources}, container] +#@ else: +#@ output = [{"name": "dind", "image": "docker:dind", "args": ["dockerd", "-H tcp://0.0.0.0:2375"], "securityContext": {"privileged": True}, "resources": dindResources}, {"name": input, "image": peer_image, "imagePullPolicy": "Always", "env": env, "volumeMounts": volumeMounts, "command": ["peer"], "args": ["node", "start"], "resources": resources}] +#@ end +#@ return output +#@ end + +#@ def ordererContainers(input, orgName, config, mspId, ordererUniquePort): +#@ env = [{"name": "ORDERER_GENERAL_LISTENADDRESS", "value": "0.0.0.0"}] +#@ env.append({"name": "ORDERER_GENERAL_LISTENPORT", "value": "{}".format(ordererUniquePort)}) +#@ env.append({"name": "ORDERER_GENERAL_GENESISMETHOD", "value": "file"}) +#@ env.append({"name": "FABRIC_LOGGING_SPEC", "value": config.ordererFabricLoggingSpec}) +#@ if config.tls == "mutual": +#@ env.append({"name": "ORDERER_GENERAL_TLS_CLIENTROOTCAS", "value": "[{}]".format(", ".join(mutualTLS(config, "clientrootca"))) }) +#@ env.append({"name": "ORDERER_GENERAL_TLS_CLIENTAUTHREQUIRED", "value": "true"}) +#@ env.append({"name": "ORDERER_GENERAL_TLS_ENABLED", "value": "true"}) +#@ else: +#@ env.append({"name": "ORDERER_GENERAL_TLS_ENABLED", "value": "{}".format(config.tls)}) +#@ end +#@ env.append({"name": "ORDERER_GENERAL_GENESISFILE", "value": "/etc/hyperledger/fabric/genesisblock/genesis.block"}) +#@ env.append({"name": "ORDERER_GENERAL_LOCALMSPID", "value": "{}".format(mspId)}) +#@ env.append({"name": "ORDERER_GENERAL_LOCALMSPDIR", "value": "/etc/hyperledger/fabric/artifacts/msp"}) +#@ env.append({"name": "ORDERER_GENERAL_TLS_SERVERHOSTOVERRIDE", "value": input}) +#@ env.append({"name": "ORDERER_GENERAL_TLS_PRIVATEKEY", "value": "/etc/hyperledger/fabric/artifacts/tls/server.key"}) +#@ env.append({"name": "ORDERER_GENERAL_TLS_CERTIFICATE", "value": "/etc/hyperledger/fabric/artifacts/tls/server.crt"}) +#@ env.append({"name": "ORDERER_GENERAL_TLS_ROOTCAS", "value": "[/etc/hyperledger/fabric/artifacts/msp/tlscacerts/tlsca.{}-cert.pem]".format(orgName)}) +#@ env.append({"name": "ORDERER_GENERAL_CLUSTER_CLIENTPRIVATEKEY", "value": "/etc/hyperledger/fabric/artifacts/tls/server.key"}) +#@ env.append({"name": "ORDERER_GENERAL_CLUSTER_CLIENTCERTIFICATE", "value": "/etc/hyperledger/fabric/artifacts/tls/server.crt"}) +#@ env.append({"name": "ORDERER_FILELEDGER_LOCATION", "value": "/shared/data"}) +#@ env.append({"name": "ORDERER_CONSENSUS_WALDIR", "value": "/shared/data/etcdraft/wal"}) +#@ env.append({"name": "ORDERER_CONSENSUS_SNAPDIR", "value": "/shared/data/etcdraft/snapshot"}) +#@ env.append({"name": "ORDERER_OPERATIONS_LISTENADDRESS", "value": ":8443"}) +#@ if config.metrics == True: +#@ env.append({"name": "ORDERER_OPERATIONS_TLS_ENABLED", "value": "false" }) +#@ env.append({"name": "ORDERER_METRICS_PROVIDER", "value": "prometheus" }) +#@ end +#@ volumeMounts = mounts("orderer", config.enableNodeOUs) +#@ volumeMounts.append({"mountPath": "/etc/hyperledger/fabric/genesisblock", "name": "genesisblock"}) +#@ if config.tls == "mutual": +#@ volumeMounts += mutualTLS(config, "volumeMounts") +#@ end +#@ if config.k8s.dataPersistence == True or config.k8s.dataPersistence == "local": +#@ volumeMounts.append({"mountPath": "/shared/data", "name": "orderer-data-storage"}) +#@ end +#@ resources = config.k8s.resources.orderers +#@ orderer_image = "" +#@ if validateAttributeExists(config, "orderer"): +#@ orderer_image = config.dockerImages.orderer +#@ else: +#@ orderer_image = "{}/fabric-orderer:{}".format(config.dockerOrg, config.dockerTag) +#@ end +#@ output = [{"name": input, "image": orderer_image, "imagePullPolicy": "Always", "env": env, "resources": resources, "volumeMounts": volumeMounts, "command": ["orderer"]}] +#@ return output +#@ end + +#@ def kafkaSpec(input, id, replicas, type, numZK, config): +#@ type = {} +#@ specData = {} +#@ if input.startswith("zookeeper"): +#@ type = "zookeeper" +#@ if config.k8s.dataPersistence == True: +#@ specData = {"volumes": [{"name": "zookeeper-data-storage", "persistentVolumeClaim": {"claimName": "{}-data".format(input)}}], "affinity": {"podAntiAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [{"weight": 1, "podAffinityTerm": {"labelSelector": {"matchExpressions": [{"key": "type", "operator": "In", "values": ["zookeeper"]}]}, "topologyKey": "kubernetes.io/hostname"}}]}}, +#@ "containers": zkContainers(input, id, zkList(numZK, type), config)} +#@ else: +#@ specData = {"affinity": {"podAntiAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [{"weight": 1, "podAffinityTerm": {"labelSelector": {"matchExpressions": [{"key": "type", "operator": "In", "values": ["zookeeper"]}]}, "topologyKey": "kubernetes.io/hostname"}}]}}, +#@ "containers": zkContainers(input, id, zkList(numZK, type), config)} +#@ end +#@ elif input.startswith("kafka"): +#@ type = "kafka" +#@ if config.k8s.dataPersistence == True: +#@ specData = {"volumes": [{"name": "kafka-data-storage", "persistentVolumeClaim": {"claimName": "{}-data".format(input)}}], "affinity": {"podAntiAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [{"weight": 1, "podAffinityTerm": {"labelSelector": {"matchExpressions": [{"key": "type", "operator": "In", "values": ["kafka"]}]}, "topologyKey": "kubernetes.io/hostname"}}]}}, +#@ "containers": kafkaContainers(input, id, replicas, zkList(numZK, type), config)} +#@ else: +#@ specData = {"affinity": {"podAntiAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [{"weight": 1, "podAffinityTerm": {"labelSelector": {"matchExpressions": [{"key": "type", "operator": "In", "values": ["kafka"]}]}, "topologyKey": "kubernetes.io/hostname"}}]}}, +#@ "containers": kafkaContainers(input, id, replicas, zkList(numZK, type), config)} +#@ end +#@ end +#@ return specData +#@ end + +#@ def spec(input, orgName, type, config, mspId, port): +#@ specData = {} +#@ metadata = {} +#@ initVolumes = [{"name": "cacerts", "configMap": {"name": "{}-msp".format(input), "items": [{"key": "cacerts", "path": "ca.{}-cert.pem".format(orgName)}]}}, +#@ {"name": "signcerts", "configMap": {"name": "{}-msp".format(input), "items": [{"key": "signcerts", "path": "{}.{}-cert.pem".format(input, orgName)}]}}, +#@ {"name": "tlscacerts", "configMap": {"name": "{}-msp".format(input), "items": [{"key": "tlscacerts", "path": "tlsca.{}-cert.pem".format(orgName)}]}}, +#@ {"name": "keystore", "configMap": {"name": "{}-msp".format(input), "items": [{"key": "keystore", "path": "priv_sk"}]}}, +#@ {"name": "tls", "configMap": {"name": "{}-tls".format(input)}}] +#@ if config.enableNodeOUs: +#@ initVolumes.append({"name": "admincerts", "configMap": {"name": "{}-admincerts".format(orgName)}}) +#@ initVolumes.append({"name": "config", "configMap": {"name": "{}-msp".format(input), "items": [{"key": "config", "path": "config.yaml"}]}}) +#@ else: +#@ initVolumes.append({"name": "admincerts", "configMap": {"name": "{}-admincerts".format(orgName), "items": [{"key": "admincerts", "path": "Admin@{}-cert.pem".format(orgName)}]}}) +#@ end +#@ if type == "ca": +#@ volumes = [{"name": "cacerts", "configMap": {"name": "{}-ca".format(orgName)}}] +#@ specData = {"volumes": volumes, "affinity": {"podAntiAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [{"weight": 1, "podAffinityTerm": {"labelSelector": {"matchExpressions": [{"key": "type", "operator": "In", "values": ["{}".format(type)]}]}, "topologyKey": "kubernetes.io/hostname"}}]}}, +#@ "containers": caContainers(input, orgName, config)} +#@ elif type == "orderer": +#@ volumes = initVolumes +#@ volumes.append({"name": "genesisblock", "secret": {"secretName": "genesisblock"}}) +#@ if config.k8s.dataPersistence == True: +#@ volumes.append({"name": "orderer-data-storage", "persistentVolumeClaim": {"claimName": "{}-data".format(input)}}) +#@ elif config.k8s.dataPersistence == "local": +#@ volumes.append({"name": "orderer-data-storage", "hostPath": {"path": "/shared/{}-data".format(input)}}) +#@ end +#@ if config.tls == "mutual": +#@ volumes += mutualTLS(config, "volumes") +#@ end +#@ specData = {"volumes": volumes, "affinity": {"podAntiAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [{"weight": 1, "podAffinityTerm": {"labelSelector": {"matchExpressions": [{"key": "type", "operator": "In", "values": ["{}".format(type)]}]}, "topologyKey": "kubernetes.io/hostname"}}]}}, +#@ "containers": ordererContainers(input, orgName, config, mspId, port)} +#@ elif type == "peer": +#@ volumes = initVolumes +#@ if config.k8s.dataPersistence == True: +#@ volumes.append({"name": "peer-data-storage", "persistentVolumeClaim": {"claimName": "{}-data".format(input)}}) +#@ if config.dbType == "couchdb": +#@ volumes.append({"name": "couchdb-data-storage", "persistentVolumeClaim": {"claimName": "couchdb-{}-data".format(input)}}) +#@ end +#@ elif config.k8s.dataPersistence == "local": +#@ volumes.append({"name": "peer-data-storage", "hostPath": {"path": "/shared/{}-data".format(input)}}) +#@ if config.dbType == "couchdb": +#@ volumes.append({"name": "couchdb-data-storage", "hostPath": {"path": "/shared/couchdb-{}-data".format(input)}}) +#@ end +#@ end +#@ if config.tls == "mutual": +#@ volumes += mutualTLS(config, "volumes") +#@ end +#@ specData = {"volumes": volumes, "affinity": {"podAntiAffinity": {"preferredDuringSchedulingIgnoredDuringExecution": [{"weight": 1, "podAffinityTerm": {"labelSelector": {"matchExpressions": [{"key": "type", "operator": "In", "values": ["{}".format(type)]}]}, "topologyKey": "kubernetes.io/hostname"}}]}}, +#@ "containers": peerContainers(input, orgName, config, mspId, port)} +#@ end +#@ selector = {"matchLabels": {"k8s-app": input, "type": type}} +#@ if config.metrics == True: +#@ if type == "orderer": +#@ metadata = {"labels": {"k8s-app": input, "type": type}, "annotations": {"prometheus.io/scrape": "true", "prometheus.io/path": "/metrics", "prometheus.io/port": "8443", "prometheus.io/scheme": "http"}} +#@ elif type == "peer": +#@ metadata = {"labels": {"k8s-app": input, "type": type}, "annotations": {"prometheus.io/scrape": "true", "prometheus.io/path": "/metrics", "prometheus.io/port": "9443", "prometheus.io/scheme": "http"}} +#@ else: +#@ metadata = {"labels": {"k8s-app": input, "type": type}} +#@ end +#@ else: +#@ metadata = {"labels": {"k8s-app": input, "type": type}} +#@ end +#@ template = {"metadata": metadata, "spec": specData} +#@ output = {"selector": selector, "serviceName": input, "replicas": 1, "template": template} +#@ return output +#@ end + +#@ def zkList(numZK, type): +#@ output = [] +#@ for i in range(0, config.kafka.numZookeepers): +#@ id = i + 1 +#@ if type == "zookeeper": +#@ id = i + 1 +#@ output.append("server.{}=zookeeper{}:2888:3888".format(id, i)) +#@ zkList = " ".join(output) +#@ elif type == "kafka": +#@ output.append("zookeeper{}:2181".format(i)) +#@ zkList = ", ".join(output) +#@ end +#@ end +#@ return zkList +#@ end + +#@ config = data.values +#@ if config.orderer.ordererType == "kafka": +#@ for i in range(0, config.kafka.numZookeepers): +--- +apiVersion: v1 +kind: Pod +metadata: + name: #@ "zookeeper{}".format(i) + labels: + k8s-app: #@ "zookeeper{}".format(i) + type: zookeeper +spec: #@ kafkaSpec("zookeeper{}".format(i), i, 0, "zookeeper", config.kafka.numZookeepers, config) +#@ end +#@ for j in range(0, config.kafka.numKafka): +--- +apiVersion: v1 +kind: Pod +metadata: + name: #@ "kafka{}".format(j) + labels: + k8s-app: #@ "kafka{}".format(j) + type: kafka +spec: #@ kafkaSpec("kafka{}".format(j), j, config.kafka.numKafkaReplications, "kafka", config.kafka.numZookeepers, config) +#@ end +#@ end + +#@ peerUniquePort = 31000 +#@ for i in range(0, len(config.peerOrganizations)): +#@ organization = config.peerOrganizations[i] +#@ for j in range(0, organization.numCa): +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: #@ "ca{}-{}".format(j, organization.name) +spec: #@ spec("ca{}-{}".format(j, organization.name), organization.name, "ca", data.values, organization.mspId, "") +#@ end +#@ for j in range(0, organization.numPeers): +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: #@ "peer{}-{}".format(j, organization.name) +spec: #@ spec("peer{}-{}".format(j, organization.name), organization.name, "peer", config, organization.mspId, peerUniquePort) +#@ peerUniquePort += 1 +#@ end +#@ end + +#@ ordererUniquePort = 30000 +#@ num_organizations = len(config.ordererOrganizations) +#@ for i in range(0, num_organizations): +#@ organization = config.ordererOrganizations[i] +#@ for j in range(0, organization.numCa): +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: #@ "ca{}-{}".format(j, organization.name) +spec: #@ spec("ca{}-{}".format(j, organization.name), organization.name, "ca", data.values, organization.mspId, "") +#@ end +#@ numOderers = organization.numOderers +#@ for j in range(0, numOderers): +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: #@ "orderer{}-{}".format(j, organization.name) +spec: #@ spec("orderer{}-{}".format(j, organization.name), organization.name, "orderer", config, organization.mspId, ordererUniquePort) +#@ ordererUniquePort += 1 +#@ end +#@ end \ No newline at end of file diff --git a/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-pvc.yaml b/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-pvc.yaml new file mode 100644 index 000000000..357810658 --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-pvc.yaml @@ -0,0 +1,91 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +#@ load("@ytt:data", "data") +#@ config = data.values +#@ if config.k8s.dataPersistence == True: +#@ if config.orderer.ordererType == "kafka": +#@ for i in range(0, config.kafka.numKafka): +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: #@ "kafka{}-data".format(i) +spec: + storageClassName: #@ config.k8s.storageClass + accessModes: + - ReadWriteMany + resources: + requests: + storage: #@ config.k8s.storageCapacity +#@ end + +#@ for i in range(0, config.kafka.numZookeepers): +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: #@ "zookeeper{}-data".format(i) +spec: + storageClassName: #@ config.k8s.storageClass + accessModes: + - ReadWriteMany + resources: + requests: + storage: #@ config.k8s.storageCapacity +#@ end +#@ end + + +#@ for i in range(0, len(config.peerOrganizations)): +#@ organization = config.peerOrganizations[i] +#@ for j in range(0, organization.numPeers): +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: #@ "peer{}-{}-data".format(j,organization.name) +spec: + storageClassName: #@ config.k8s.storageClass + accessModes: + - ReadWriteMany + resources: + requests: + storage: #@ config.k8s.storageCapacity +#@ if config.dbType == "couchdb": +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: #@ "couchdb-peer{}-{}-data".format(j,organization.name) +spec: + storageClassName: #@ config.k8s.storageClass + accessModes: + - ReadWriteMany + resources: + requests: + storage: #@ config.k8s.storageCapacity +#@ end +#@ end +#@ end +#@ num_ordererOrgs = len(config.ordererOrganizations) +#@ for i in range(0, num_ordererOrgs): +#@ organization = config.ordererOrganizations[i] +#@ numOderers = organization.numOderers +#@ for j in range(0, numOderers): +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: #@ "orderer{}-{}-data".format(j,organization.name) +spec: + storageClassName: #@ config.k8s.storageClass + accessModes: + - ReadWriteMany + resources: + requests: + storage: #@ config.k8s.storageCapacity +#@ end +#@ end +#@ end diff --git a/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-service.yaml b/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-service.yaml new file mode 100755 index 000000000..0c7b0b42c --- /dev/null +++ b/app/platform/fabric/e2e-test/specs/templates-v2/k8s/fabric-k8s-service.yaml @@ -0,0 +1,131 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +#@ load("@ytt:data", "data") +#@ config = data.values +#@ peerUniquePort = 31000 +#@ for i in range(0, len(config.peerOrganizations)): +#@ organization = config.peerOrganizations[i] +#@ for j in range(0, organization.numCa): +--- +kind: Service +apiVersion: v1 +metadata: + labels: + k8s-app: #@ "ca{}-{}".format(j, organization.name) + name: #@ "ca{}-{}".format(j, organization.name) +spec: + selector: + k8s-app: #@ "ca{}-{}".format(j, organization.name) + type: #@ config.k8s.serviceType + ports: + - name: port1 + port: 7054 +#@ end +#@ for j in range(0, organization.numPeers): +--- +kind: Service +apiVersion: v1 +metadata: + labels: + k8s-app: #@ "peer{}-{}".format(j, organization.name) + name: #@ "peer{}-{}".format(j, organization.name) +spec: + selector: + k8s-app: #@ "peer{}-{}".format(j, organization.name) + type: #@ config.k8s.serviceType + ports: + - name: port1 + port: #@ peerUniquePort +#@ if config.k8s.serviceType == "NodePort": + nodePort: #@ peerUniquePort +#@ end + - name: port2 + port: 9443 +#@ peerUniquePort += 1 +#@ end +#@ end +#@ num_ordererOrgs = len(config.ordererOrganizations) +#@ ordererUniquePort = 30000 +#@ for i in range(0, num_ordererOrgs): +#@ organization = config.ordererOrganizations[i] +#@ numOderers = organization.numOderers +#@ for j in range(0, organization.numCa): +--- +kind: Service +apiVersion: v1 +metadata: + labels: + k8s-app: #@ "ca{}-{}".format(i, organization.name) + name: #@ "ca{}-{}".format(i, organization.name) +spec: + selector: + k8s-app: #@ "ca{}-{}".format(i, organization.name) + type: #@ config.k8s.serviceType + ports: + - name: port1 + port: 7054 +#@ end +#@ for j in range(0, numOderers): +--- +kind: Service +apiVersion: v1 +metadata: + labels: + k8s-app: #@ "orderer{}-{}".format(j, organization.name) + name: #@ "orderer{}-{}".format(j, organization.name) +spec: + selector: + k8s-app: #@ "orderer{}-{}".format(j, organization.name) + type: #@ config.k8s.serviceType + ports: + - name: port1 + port: #@ ordererUniquePort +#@ if config.k8s.serviceType == "NodePort": + nodePort: #@ ordererUniquePort +#@ end + - name: port2 + port: 8443 +#@ ordererUniquePort += 1 +#@ end +#@ end + +#@ if config.orderer.ordererType == "kafka": +#@ for i in range(0, config.kafka.numKafka): +--- +kind: Service +apiVersion: v1 +metadata: + labels: + k8s-app: #@ "kafka{}".format(i) + name: #@ "kafka{}".format(i) +spec: + selector: + k8s-app: #@ "kafka{}".format(i) + ports: + - name: port1 + port: 9092 + - name: port2 + port: 9093 +#@ end +#@ for j in range(0, config.kafka.numZookeepers): +--- +kind: Service +apiVersion: v1 +metadata: + labels: + k8s-app: #@ "zookeeper{}".format(j) + name: #@ "zookeeper{}".format(j) +spec: + selector: + k8s-app: #@ "zookeeper{}".format(j) + ports: + - name: port1 + port: 2888 + - name: port2 + port: 3888 + - name: port3 + port: 2181 +#@ end +#@ end \ No newline at end of file diff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.yml index 538875991..01c921bf7 100644 --- a/ci/azure-pipelines.yml +++ b/ci/azure-pipelines.yml @@ -43,7 +43,7 @@ jobs: summaryFileLocation: $(System.DefaultWorkingDirectory)/output.xml pathToSources: $(System.DefaultWorkingDirectory)/client -- job: SanityChecks +- job: SanityChecks_v1_4 pool: vmImage: ubuntu-16.04 steps: @@ -51,10 +51,10 @@ jobs: - checkout: self - script: | npm install - npm run e2e-api-test:ci - displayName: Run Sanity Checks + npm run e2e-api-test-v1 + displayName: Run Sanity Checks for v1.4 -- job: GUITests +- job: SanityChecks_v2_1 pool: vmImage: ubuntu-16.04 steps: @@ -62,5 +62,28 @@ jobs: - checkout: self - script: | npm install - npm run e2e-gui-test:ci - displayName: Run GUI Tests + npm run e2e-api-test-v2 + displayName: Run Sanity Checks for v2.1 + +- job: GUITests_v1_4 + pool: + vmImage: ubuntu-16.04 + steps: + - template: install_deps.yml + - checkout: self + - script: | + npm install + npm run e2e-gui-test-v1 + displayName: Run GUI Tests for v1.4 + +- job: GUITests_v2_1 + pool: + vmImage: ubuntu-16.04 + steps: + - template: install_deps.yml + - checkout: self + - script: | + npm install + npm run e2e-gui-test-v2 + displayName: Run GUI Tests for v2.1 + \ No newline at end of file diff --git a/client/e2e-test/configs/connection-profile/org1-network-for-guitest.json b/client/e2e-test/configs/connection-profile/org1-network-for-guitest.json index cc8554d07..eef63a934 100644 --- a/client/e2e-test/configs/connection-profile/org1-network-for-guitest.json +++ b/client/e2e-test/configs/connection-profile/org1-network-for-guitest.json @@ -1,5 +1,5 @@ { - "name": "first-network", + "name": "org1-network", "version": "1.0.0", "license": "Apache-2.0", "client": { diff --git a/client/e2e-test/gui-e2e-test-start.sh b/client/e2e-test/gui-e2e-test-start.sh index 6fe38d816..02ca4d99c 100755 --- a/client/e2e-test/gui-e2e-test-start.sh +++ b/client/e2e-test/gui-e2e-test-start.sh @@ -4,32 +4,86 @@ # SPDX-License-Identifier: Apache-2.0 # +TIMEOUT=600 +DELAY=10 ROOTDIR="$(cd "$(dirname "$0")"/../.. && pwd)" +FABRIC_V1_VERSION=1.4.6 +FABRIC_V2_VERSION=2.1.1 -TIMEOUT=600 -DELAY=10 +echo "#### Downloaded fabric-test repo" + +if [ $# -eq 0 ]; then + echo "$0 [-1 | -2]" + exit 1; +fi + +while getopts "12" opt; do + case "$opt" in + 1) + SDKVER=1.4.8 + export FABRIC_VERSION=1 + export RELEASE_VERSION=1.4-stable + CHECKOUT_HASH=45799a2ee4eefa49ae705cc57ed415270c35d60a + # export FABRIC_CFG_PATH=$GOPATH/src/github.com/hyperledger/fabric-test/scripts/config + export PATH=$GOPATH/src/github.com/hyperledger/fabric-test/scripts/bin:$PATH + PULL_PEER_IMAGE_VERSION=${FABRIC_V1_VERSION} + PULL_CA_IMAGE_VERSION=${FABRIC_V1_VERSION} + ;; + 2) + SDKVER=2.0.0-beta.2 + export FABRIC_VERSION=2 + CHECKOUT_HASH=09680bea5aa0ec464982f7979fd99a777e8c1fed + export FABRIC_CFG_PATH=$GOPATH/src/github.com/hyperledger/fabric-test/config + export PATH=$GOPATH/src/github.com/hyperledger/fabric-test/bin:$PATH + PULL_PEER_IMAGE_VERSION=${FABRIC_V2_VERSION} + PULL_CA_IMAGE_VERSION=${FABRIC_V1_VERSION} + ;; + *) + echo "$0 [-1 | -2]" + exit 1; + ;; + esac +done + +echo "HASH: ${CHECKOUT_HASH}" +echo "SDK : ${SDKVER}" +echo "ROOT: ${ROOTDIR}" set -e mkdir -p $GOPATH/src/github.com/hyperledger pushd $GOPATH/src/github.com/hyperledger +sudo rm -rf fabric-test if [ ! -d fabric-test ]; then - git clone https://github.com/hyperledger/fabric-test.git -b release-1.4 + git clone https://github.com/hyperledger/fabric-test.git fi cd fabric-test -git checkout 45799a2ee4eefa49ae705cc57ed415270c35d60a +# git checkout 45799a2ee4eefa49ae705cc57ed415270c35d60a +git checkout ${CHECKOUT_HASH} +make pull-binaries-fabric echo "#### Updated each sub-module under fabric-test repo" popd pushd $GOPATH/src/github.com/hyperledger/fabric-test/tools/PTE -rm -rf node_modules package-lock.json -npm install fabric-client@1.4.8 -npm install fabric-ca-client@1.4.8 +npm install fabric-client@${SDKVER} +npm install fabric-ca-client@${SDKVER} echo "#### Installed required node packages" popd +pushd ${ROOTDIR} +./build_docker_image.sh -d +popd + +pushd ${ROOTDIR} +rm -rf wallet logs +popd + +curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- ${PULL_PEER_IMAGE_VERSION} ${PULL_CA_IMAGE_VERSION} 0.4.18 -s -b +docker pull hyperledger/fabric-ca:${FABRIC_V1_VERSION} +docker tag hyperledger/fabric-ca:${FABRIC_V1_VERSION} hyperledger/fabric-ca:${FABRIC_V2_VERSION} + # # Start selenium standalone server # diff --git a/client/e2e-test/specs/chaincode/chaincode_view.js b/client/e2e-test/specs/chaincode/chaincode_view.js index 56a9b075c..6b139b0e3 100644 --- a/client/e2e-test/specs/chaincode/chaincode_view.js +++ b/client/e2e-test/specs/chaincode/chaincode_view.js @@ -11,23 +11,23 @@ function test() { context('Chaincode list', () => { it('should have an entry: BE-688', () => { // Num. of blocks - var ccLink = browser.$( + const ccLink = browser.$( '#root > div > div:nth-child(1) > div:nth-child(2) > nav > div > ul > li:nth-child(5)' ); ccLink.click(); browser.pause(5000); - var ccName = browser.$( + const ccName = browser.$( '#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(1)' ); ccName.getText().should.be.equal('samplecc'); - var ccTxCount = browser.$( + const ccTxCount = browser.$( '#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(4)' ); - ccTxCount.getText().should.be.equal('40'); + parseInt(ccTxCount.getText(), 10).should.be.least(40); - var ccChName = browser.$( + const ccChName = browser.$( '#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(2)' ); ccChName.getText().should.be.equal('testorgschannel0'); diff --git a/client/e2e-test/specs/dashboard/dashboard.js b/client/e2e-test/specs/dashboard/dashboard.js index 976eb8525..d7f2fe1d9 100644 --- a/client/e2e-test/specs/dashboard/dashboard.js +++ b/client/e2e-test/specs/dashboard/dashboard.js @@ -5,7 +5,7 @@ /* eslint-disable no-unused-expressions */ require('chai').should(); -var expect = require('chai').expect; +const expect = require('chai').expect; function test() { describe('Dashboard view', () => { @@ -16,7 +16,7 @@ function test() { }); // Num. of blocks - var nodeNum = browser + let nodeNum = browser .$( '#root > div > div > div > div > div:nth-child(1) > div > div > div:nth-child(1) > div > div:nth-child(2) > h1' ) @@ -24,12 +24,12 @@ function test() { nodeNum.should.be.equal('6'); // Num. of TX - var txNum = browser + const txNum = browser .$( '#root > div > div > div > div > div:nth-child(1) > div > div > div:nth-child(2) > div > div:nth-child(2) > h1' ) .getText(); - txNum.should.be.equal('44'); + parseInt(txNum, 10).should.be.least(40); // Num. of Nodes nodeNum = browser @@ -37,10 +37,10 @@ function test() { '#root > div > div > div > div > div:nth-child(1) > div > div > div:nth-child(3) > div > div:nth-child(2) > h1' ) .getText(); - nodeNum.should.be.equal('4'); + nodeNum.should.be.equal('3'); // Num. of CC - var ccNum = browser + const ccNum = browser .$( '#root > div > div > div > div > div:nth-child(1) > div > div > div:nth-child(4) > div > div:nth-child(2) > h1' ) @@ -51,33 +51,31 @@ function test() { context('Peer list', () => { it('should have 4 peers and 3 orderers', () => { - var peerList = browser.$( + const peerList = browser.$( '#root > div > div > div > div > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div > div > div.rt-table > div.rt-tbody' ); - var elmNum = peerList.getProperty('childElementCount'); - elmNum.should.be.equal(7); + const elmNum = peerList.getProperty('childElementCount'); + elmNum.should.be.equal(5); }); it('should have the correct URL for each peer', () => { - var peerUrlList = browser.$$( + const peerUrlList = browser.$$( '#root > div > div > div > div > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div > div > div.rt-table > div.rt-tbody > div > div > div' ); - let peerUrlStrList = peerUrlList.map((elm, idx, array) => { + const peerUrlStrList = peerUrlList.map((elm, idx, array) => { return elm.getText(); }); expect(peerUrlStrList).to.include('peer0-org1'); expect(peerUrlStrList).to.include('peer1-org1'); expect(peerUrlStrList).to.include('peer0-org2'); - expect(peerUrlStrList).to.include('peer1-org2'); expect(peerUrlStrList).to.include('orderer0-ordererorg1'); expect(peerUrlStrList).to.include('orderer1-ordererorg1'); - expect(peerUrlStrList).to.include('orderer2-ordererorg1'); }); }); describe('Block history', () => { it('should have 3 block entries', () => { - var blkList = browser.$$( + const blkList = browser.$$( '#root > div > div > div > div > div:nth-child(2) > div:nth-child(1) > div:nth-child(2) > div > div > div > section > div > div > div:nth-child(2) > div:nth-child(1)' ); blkList[0].getText().should.be.equal('Block 5'); @@ -88,13 +86,13 @@ function test() { describe('MSP pie chart', () => { it('should response to click', () => { - var tooltip = browser.$( + let tooltip = browser.$( '#root > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div > div.recharts-tooltip-wrapper.recharts-tooltip-wrapper-right.recharts-tooltip-wrapper-bottom > div > ul > li > span.recharts-tooltip-item-name' ); - var displayTooltip = tooltip.isExisting(); + let displayTooltip = tooltip.isExisting(); expect(displayTooltip).to.be.false; - var path = browser.$( + const path = browser.$( '#root > div > div > div > div > div:nth-child(2) > div:nth-child(2) > div > div > div > svg > g > g:nth-child(1)' ); path.click(); diff --git a/client/e2e-test/specs/gui-e2e-test-network-spec-v2.yml b/client/e2e-test/specs/gui-e2e-test-network-spec-v2.yml new file mode 100644 index 000000000..dab951e4f --- /dev/null +++ b/client/e2e-test/specs/gui-e2e-test-network-spec-v2.yml @@ -0,0 +1,138 @@ +#! Copyright IBM Corp. All Rights Reserved. +#! +#! SPDX-License-Identifier: Apache-2.0 + +--- +#! fabricVersion: +#! Released images are pulled from docker hub hyperledger/, e.g. 1.4.5 or 2.0.0 +#! Development stream images are pulled from +#! hyperledger-fabric.jfrog.io/, e.g. 1.4.5-stable or 2.0.0-stable +dockerOrg: hyperledger +dockerTag: 2.1.1 + +#! peer database ledger type (couchdb, goleveldb) +dbType: goleveldb +#! This parameter is used to define fabric logging spec in peers +peerFabricLoggingSpec: info +#! This parameter is used to define fabric logging spec in orderers +ordererFabricLoggingSpec: info +#! tls in the network (true, false or mutual(mutualtls)) +tls: true +#! fabric metrics with prometheus (true/false) +metrics: false +#! true - enable gossip and dynamic leader election +#! false - disable gossip and set all peers as org leaders +gossipEnable: true +#! enable node ou's in fabric network (true/false) +enableNodeOUs: true + +#! For smoke test suite, crypto-config, connection-profile and channel-artifacts are stored +#! in smoke directory +artifactsLocation: . + +#! Orderer Config Settings +orderer: +#! Consensus type + ordererType: etcdraft + batchSize: + maxMessageCount: 100 + absoluteMaxBytes: 10 MB + preferredMaxBytes: 2 MB + batchTimeOut: 2s +#! Etcd raft options and this will be used when ordererType is +#! selected as etcdraft + etcdraftOptions: + tickInterval: 500ms + electionTick: 10 + heartbeatTick: 1 + maxInflightBlocks: 5 + snapshotIntervalSize: 100 MB + +#! Not being used for smoke test suite +#! Number of kafka and zookeeper to be launched in network +#! when ordererType is kafka +kafka: + numKafka: 5 + #! number of kafka replications for each channel + numKafkaReplications: 3 + numZookeepers: 3 + +ordererOrganizations: +- name: ordererorg1 + mspId: OrdererOrgExampleCom + numOderers: 2 + numCa: 0 + +peerOrganizations: +- name: org1 + mspId: Org1ExampleCom + numPeers: 2 + numCa: 1 + +- name: org2 + mspId: Org2ExampleCom + numPeers: 1 + numCa: 1 + +#! Capabilites for Orderer, Channel, Application groups +ordererCapabilities: V2_0 + +channelCapabilities: V2_0 + +applicationCapabilities: V2_0 + +#! Create the channel creation transactions; every org will be included in every channel +#! This used testorgschannel as the prefix and channels are used like testorgschannel0, +#! testorgschannel1.... based on number of channels passed +#! (note: client will need to submit the transactions to create channels) +numChannels: 1 + +#! Not being used for smoke test suite +k8s: + serviceType: NodePort + #! dataPersistence is used to store the data from fabric containers + #! It can take values of true, false and local + #! When true is used, it uses storageClass and storageCapacity to create + #! persistent volumes. When false is used, backup will not be configured. + #! When local is used, hostPath will be used to store the data from fabric containers + #! to worker nodes on which pods are running. + dataPersistence: true + storageClass: default + storageCapacity: 20Gi + resources: + orderers: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: "0.5" + memory: 1Gi + peers: + limits: + cpu: "0.5" + memory: 2Gi + requests: + cpu: "0.5" + memory: 2Gi +#! dind will be used to run all chaincode containers of a peer + dind: + limits: + cpu: "1" + memory: 1Gi + requests: + cpu: "1" + memory: 1Gi + couchdb: + limits: + cpu: "0.2" + memory: 1Gi + requests: + cpu: "0.1" + memory: 1Gi + kafka: + limits: + cpu: "0.2" + memory: 1Gi + requests: + cpu: "0.1" + memory: 1Gi diff --git a/client/e2e-test/specs/gui-e2e-test-network-spec.yml b/client/e2e-test/specs/gui-e2e-test-network-spec.yml index df0fdb9d1..09ee389b5 100644 --- a/client/e2e-test/specs/gui-e2e-test-network-spec.yml +++ b/client/e2e-test/specs/gui-e2e-test-network-spec.yml @@ -7,7 +7,7 @@ #! Released images are pulled from docker hub hyperledger/, e.g. 1.4.5 or 2.0.0 #! Development stream images are pulled from #! hyperledger-fabric.jfrog.io/, e.g. 1.4.5-stable or 2.0.0-stable -fabricVersion: 1.4.4 +fabricVersion: 1.4.6 #! peer database ledger type (couchdb, goleveldb) dbType: goleveldb #! This parameter is used to define fabric logging spec in peers @@ -58,7 +58,7 @@ kafka: ordererOrganizations: - name: ordererorg1 mspId: OrdererOrgExampleCom - numOderers: 3 + numOderers: 2 numCa: 0 peerOrganizations: @@ -69,7 +69,7 @@ peerOrganizations: - name: org2 mspId: Org2ExampleCom - numPeers: 2 + numPeers: 1 numCa: 1 #! Capabilites for Orderer, Channel, Application groups diff --git a/client/e2e-test/specs/network/network_view.js b/client/e2e-test/specs/network/network_view.js index 767785165..55288a2c2 100644 --- a/client/e2e-test/specs/network/network_view.js +++ b/client/e2e-test/specs/network/network_view.js @@ -5,34 +5,32 @@ /* eslint-disable no-unused-expressions */ require('chai').should(); -var expect = require('chai').expect; +const expect = require('chai').expect; function test() { describe('Explorer network view', () => { describe('Peer node list', () => { it('should have 4 peers and 3 orderer: BE-695', () => { // Validate each node name retrieved form the table - var networkLink = browser.$( + const networkLink = browser.$( '#root > div > div:nth-child(1) > div:nth-child(2) > nav > div > ul > li:nth-child(2)' ); networkLink.click(); browser.pause(5000); - var pageSizeSelector = browser.$('.-pageSizeOptions select'); + const pageSizeSelector = browser.$('.-pageSizeOptions select'); pageSizeSelector.selectByIndex(1); - var nodeLists = browser.$$( + const nodeLists = browser.$$( '#root > div > div > div > div > div > div > div > div.rt-table > div.rt-tbody > div > div > div:nth-child(1)' ); - let nodeStrList = nodeLists.map((elm, idx, array) => { + const nodeStrList = nodeLists.map((elm, idx, array) => { return elm.getText(); }); expect(nodeStrList).to.include('peer0-org1'); expect(nodeStrList).to.include('peer1-org1'); expect(nodeStrList).to.include('peer0-org2'); - expect(nodeStrList).to.include('peer1-org2'); expect(nodeStrList).to.include('orderer0-ordererorg1'); expect(nodeStrList).to.include('orderer1-ordererorg1'); - expect(nodeStrList).to.include('orderer2-ordererorg1'); }); }); }); diff --git a/client/e2e-test/specs/root.js b/client/e2e-test/specs/root.js index 75b2be537..c7fd8b679 100644 --- a/client/e2e-test/specs/root.js +++ b/client/e2e-test/specs/root.js @@ -26,10 +26,12 @@ describe('GUI e2e test', () => { '/src/github.com/hyperledger/fabric-test', '/tools/operator' ); - network_spec_path = path.join( - cwd, - 'e2e-test/specs/gui-e2e-test-network-spec.yml' - ); + const fabricVer = process.env.FABRIC_VERSION; + let networkSpec = 'gui-e2e-test-network-spec.yml'; + if (fabricVer === '2') { + networkSpec = 'gui-e2e-test-network-spec-v2.yml'; + } + network_spec_path = path.join(cwd, 'e2e-test/specs', networkSpec); const test_input_path = path.join(cwd, 'e2e-test/specs/smoke-test-input.yml'); process.chdir(fabric_test_path); diff --git a/client/e2e-test/specs/smoke-test-input.yml b/client/e2e-test/specs/smoke-test-input.yml index 1579c3ae7..93fc3fc60 100644 --- a/client/e2e-test/specs/smoke-test-input.yml +++ b/client/e2e-test/specs/smoke-test-input.yml @@ -30,21 +30,16 @@ joinChannel: installChaincode: # installs chaincode with specified name on all peers in listed organziations - name: samplecc + sdk: cli version: v1 path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go organizations: org1,org2 language: golang metadataPath: "" - - name: samplecc - version: v2 - path: github.com/hyperledger/fabric-test/chaincodes/samplecc/go - organizations: org1,org2 - language: golang - metadataPath: "" - instantiateChaincode: - channelName: testorgschannel0 + sdk: cli name: samplecc version: v1 args: "" @@ -52,15 +47,6 @@ instantiateChaincode: endorsementPolicy: 2of(org1,org2) collectionPath: "" -upgradeChaincode: - - channelName: testorgschannel0 - name: samplecc - version: v2 - args: "" - organizations: org1 - endorsementPolicy: 1of(org1,org2) - collectionPath: "" - invokes: - channelName: testorgschannel0 name: samplecc diff --git a/package.json b/package.json index c9e782e40..d13dc6421 100644 --- a/package.json +++ b/package.json @@ -81,16 +81,14 @@ "linter": "eslint", "lint:fix": "eslint . --fix", "precommit": "lint-staged && ./scripts/verify-license.sh", - "e2e-test-check-tool": "/bin/bash -c 'if [[ -z $(which configtxgen) ]]; then echo \"### Need to install tools ###\n\"; exit -1; fi'", - "e2e-test-check-img": "/bin/bash -c 'if [[ -z $(docker images -q hyperledger/fabric-peer:latest) ]]; then echo \"### Need to pull fabric images ###\n\"; exit -1; fi'", - "e2e-test-setup-tool:ci": "/bin/bash -c 'which configtxgen >/dev/null; if [[ $? -eq 0 ]] && [[ $(configtxgen -version | grep Version: | sed -e \"s/^.*:\\s*//\") == \"1.4.6\" ]]; then echo Found; else echo Not found; curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s -- 1.4.6 1.4.6 0.4.18 -s; fi'", - "e2e-test-setup-img": "./build_docker_image.sh -d", "e2e-test-build-src": "npm install; cd client; npm install; npm run build", - "e2e-api-test-run": "cd app/platform/fabric/e2e-test; ./runTestSuite.sh", - "e2e-api-test": "run-s e2e-test-check-tool e2e-test-check-img e2e-test-setup-img e2e-test-build-src e2e-api-test-run", - "e2e-api-test:ci": "cross-env PATH=$PATH:$PWD/bin run-s e2e-test-setup-tool:ci e2e-test-check-tool e2e-test-setup-img e2e-test-build-src e2e-api-test-run", - "e2e-gui-test-run": "cd client/e2e-test; ./gui-e2e-test-start.sh", - "e2e-gui-test": "run-s e2e-test-build-src e2e-gui-test-run", - "e2e-gui-test:ci": "cross-env PATH=$PATH:$PWD/bin run-s e2e-test-setup-tool:ci e2e-test-check-tool e2e-test-setup-img e2e-test-build-src e2e-gui-test-run" + "e2e-api-test-v1-run": "cd app/platform/fabric/e2e-test; ./runTestSuite.sh -1", + "e2e-api-test-v2-run": "cd app/platform/fabric/e2e-test; ./runTestSuite.sh -2", + "e2e-api-test-v1": "run-s e2e-test-build-src e2e-api-test-v1-run", + "e2e-api-test-v2": "run-s e2e-test-build-src e2e-api-test-v2-run", + "e2e-gui-test-v1-run": "cd client/e2e-test; ./gui-e2e-test-start.sh -1", + "e2e-gui-test-v2-run": "cd client/e2e-test; ./gui-e2e-test-start.sh -2", + "e2e-gui-test-v1": "run-s e2e-test-build-src e2e-gui-test-v1-run", + "e2e-gui-test-v2": "run-s e2e-test-build-src e2e-gui-test-v2-run" } }