-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BE-755 Upgrade e2e-test evn for fabric v2.1 Signed-off-by: Atsushi Neki <atsushin@fast.au.fujitsu.com> * BE-755 Update GUI e2e-test for fabric v2.1 Signed-off-by: Atsushi Neki <atsushin@fast.au.fujitsu.com> * BE-755 Rename job name of CI pipeline Signed-off-by: Atsushi Neki <atsushin@fast.au.fujitsu.com>
- Loading branch information
Showing
36 changed files
with
2,095 additions
and
207 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
app/platform/fabric/e2e-test/configs/connection-profile/org1-network.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "first-network", | ||
"name": "org1-network", | ||
"version": "1.0.0", | ||
"license": "Apache-2.0", | ||
"client": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 2 additions & 24 deletions
26
app/platform/fabric/e2e-test/specs/apitest-input-singleprofile.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 2 additions & 20 deletions
22
app/platform/fabric/e2e-test/specs/apitest-input-singleprofile_addnewch.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.