From 7984961a333b5c39497f069f178208a22dd01ef3 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Sun, 20 May 2018 13:40:52 -0400 Subject: [PATCH] FAB-10236 improve integration-test target The Makefile's 'integration-test' target unnecessarily builds all the docker images as a dependency. It also cleans them all, which compounds issues. The only one it might possibly need is ccenv because the tests may spin up chaincode. Also, go test ./... does not correctly handle all tests. A more correct approach would be to exec go test or ginkgo from each directory in which there is a suite. Need to ensure 3rd party images d/l'ed Change-Id: I8a5c713108c339842471f6415e79924dba7b7964 Signed-off-by: Christopher Ferris --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 758b2305e6a..9a1eaadf3df 100755 --- a/Makefile +++ b/Makefile @@ -181,8 +181,8 @@ $(BUILD_DIR)/image/testenv/$(DUMMY): $(BUILD_DIR)/image/buildenv/$(DUMMY) testenv: $(BUILD_DIR)/image/testenv/$(DUMMY) ccenv: $(BUILD_DIR)/image/ccenv/$(DUMMY) -integration-test: docker-clean docker testenv ccenv - cd integration && go test ./... +integration-test: ccenv docker-thirdparty + find ./integration -name "*suite_test.go" -execdir go test -cover \; unit-test: unit-test-clean peer-docker testenv ccenv cd unit-test && docker-compose up --abort-on-container-exit --force-recreate && docker-compose down