Skip to content

Commit 40bf2c1

Browse files
[FAB-14533] Updating integration tests
1. Fetch latest master fabric docker images from nexus 2. Make all tests to work with first-network, to reduce amount of resource files in test/resources 3. Move all tests in one class, to reduce first-network starts amount Change-Id: I45d81d7a1d84ae352d929645d6059da023a5a89a Signed-off-by: gennady <gennady@il.ibm.com>
1 parent b17d8a2 commit 40bf2c1

File tree

75 files changed

+445
-1650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+445
-1650
lines changed
Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
dependencies {
22
compile project(':fabric-chaincode-docker')
3-
testCompile 'org.testcontainers:testcontainers:1.7.1'
4-
testCompile 'org.hyperledger.fabric-sdk-java:fabric-sdk-java:1.3.0-SNAPSHOT'
3+
testCompile 'org.testcontainers:testcontainers:1.10.3'
4+
testCompile 'org.hyperledger.fabric-sdk-java:fabric-sdk-java:1.3.0'
55
compile project(':fabric-chaincode-shim')
66
}
77

8-
build.dependsOn project(':fabric-chaincode-docker').buildImage
8+
task getLatestDockerImages{
9+
doLast {
10+
exec {
11+
workingDir "."
12+
commandLine "sh", "-c", "./getDockerImages.sh"
13+
}
14+
}
15+
}
16+
compileJava.dependsOn project(':fabric-chaincode-docker').buildImage
17+
test.dependsOn project.getLatestDockerImages
918

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/bin/bash -e
2+
set -o pipefail
3+
4+
echo "======== PULL DOCKER IMAGES ========"
5+
6+
##########################################################
7+
# Pull and Tag the fabric and fabric-ca images from Nexus
8+
##########################################################
9+
echo "Fetching images from Nexus"
10+
NEXUS_URL=nexus3.hyperledger.org:10001
11+
ORG_NAME="hyperledger/fabric"
12+
13+
VERSION=2.0.0
14+
ARCH="amd64"
15+
: ${STABLE_VERSION:=$VERSION-stable}
16+
STABLE_TAG=$ARCH-$STABLE_VERSION
17+
MASTER_TAG=$ARCH-master
18+
19+
echo "---------> STABLE_VERSION:" $STABLE_VERSION
20+
21+
dockerTag() {
22+
for IMAGES in peer orderer ca tools orderer ccenv; do
23+
echo "Images: $IMAGES"
24+
echo
25+
docker pull $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG
26+
if [ $? != 0 ]; then
27+
echo "FAILED: Docker Pull Failed on $IMAGES"
28+
exit 1
29+
fi
30+
docker tag $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG $ORG_NAME-$IMAGES
31+
docker tag $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG $ORG_NAME-$IMAGES:$MASTER_TAG
32+
docker tag $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG $ORG_NAME-$IMAGES:$VERSION
33+
echo "$ORG_NAME-$IMAGES:$MASTER_TAG"
34+
echo "Deleting Nexus docker images: $IMAGES"
35+
docker rmi -f $NEXUS_URL/$ORG_NAME-$IMAGES:$STABLE_TAG
36+
done
37+
}
38+
39+
dockerTag
40+
41+
echo
42+
docker images | grep "hyperledger*"
43+
echo

fabric-chaincode-integration-test/src/test/java/org/hyperleder/fabric/shim/integration/FirstNetworkIntegrationTest.java

Lines changed: 362 additions & 0 deletions
Large diffs are not rendered by default.

fabric-chaincode-integration-test/src/test/java/org/hyperleder/fabric/shim/integration/MavenSimpleChaincodeIntegrationTest.java

Lines changed: 0 additions & 136 deletions
This file was deleted.

fabric-chaincode-integration-test/src/test/java/org/hyperleder/fabric/shim/integration/NoBuildChaincode.java

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)