From 4236ad91723b55d5892ca84118cd20b0a7986971 Mon Sep 17 00:00:00 2001 From: Marcus Brandenburger Date: Fri, 26 Jul 2024 17:38:07 +0200 Subject: [PATCH] fixup! Add test-network sample test Signed-off-by: Marcus Brandenburger --- samples/deployment/Makefile | 12 ++++++++++++ samples/deployment/test-network/Makefile | 4 ++-- samples/deployment/test-network/test.sh | 6 ++++-- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 samples/deployment/Makefile diff --git a/samples/deployment/Makefile b/samples/deployment/Makefile new file mode 100644 index 000000000..b89815aa2 --- /dev/null +++ b/samples/deployment/Makefile @@ -0,0 +1,12 @@ +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +TOP = ../.. +include $(TOP)/build.mk + +DEPLOYMENT_SAMPLES = test-network + +build test clean: + $(foreach DIR, $(DEPLOYMENT_SAMPLES), $(MAKE) -C $(DIR) $@ || exit;) + diff --git a/samples/deployment/test-network/Makefile b/samples/deployment/test-network/Makefile index 34dc36177..5175a5c7a 100644 --- a/samples/deployment/test-network/Makefile +++ b/samples/deployment/test-network/Makefile @@ -23,8 +23,8 @@ ercc-ecc-start: ercc-ecc-stop: ${DOCKER_COMPOSE} down -clobber: - docker compose down +clean: + docker compose down -v ./fabric-samples/test-network/network.sh down || true rm -rf blockchain-explorer fabric-samples .env docker system prune --force diff --git a/samples/deployment/test-network/test.sh b/samples/deployment/test-network/test.sh index 197ccc3a1..c52fc8933 100755 --- a/samples/deployment/test-network/test.sh +++ b/samples/deployment/test-network/test.sh @@ -20,7 +20,7 @@ function cleanup() { echo "Cleanup" echo "########################################" - make -C "$FPC_PATH/samples/deployment/test-network" clobber + make -C "$FPC_PATH/samples/deployment/test-network" clean } function test_network_setup() { @@ -134,7 +134,9 @@ function test_blockchain_explorer() { cd "$FPC_PATH/samples/deployment/test-network/blockchain-explorer" docker compose up -d - curl http://localhost:8080/ + #curl http://localhost:8080/ + + docker compose down -v } function test_shutdown() {