From f3569ce613f0e19a63149c08be68e0bcbb7eaf92 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 23 Apr 2020 12:32:38 -0400 Subject: [PATCH] 16029: Add 'make integration-tests-in-docker' Also update README Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- Makefile | 7 +++++-- README.md | 19 +++++++++++++++---- tools/run-integration-tests.sh | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index bb09fb2f..4a8854c3 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ RPM_FILE=$(APP_NAME)-$(VERSION)-$(ITERATION).x86_64.rpm export WORKSPACE?=$(shell pwd) -.PHONY: help clean* yarn-install test build packages packages-with-version +.PHONY: help clean* yarn-install test build packages packages-with-version integration-tests-in-docker help: @echo >&2 @@ -67,6 +67,9 @@ integration-tests: yarn-install yarn run cypress install $(WORKSPACE)/tools/run-integration-tests.sh +integration-tests-in-docker: workbench2-build-image + docker run -ti -v$(PWD):$(PWD) -w$(PWD) workbench2-build make integration-tests + test: unit-tests integration-tests build: test @@ -118,4 +121,4 @@ copy: $(DEB_FILE) $(RPM_FILE) packages: copy workbench2-build-image: - docker build -t workbench2-build . + (cd docker && docker build -t workbench2-build .) diff --git a/README.md b/README.md index 8e720520..38a26e54 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,21 @@ Install [redux-devtools-extension](https://chrome.google.com/webstore/detail/red ### Start project yarn start -### Run tests +### Run unit tests
-yarn install
-yarn test
+make unit-tests
+
+ +### Run end-to-end tests + +
+make integration-tests
+
+ +### Run end-to-end tests in a Docker container + +
+make integration-tests-in-docker
 
### Production build @@ -28,7 +39,7 @@ yarn build ### Package build
-docker build -t arvados/fpm .
+make workbench2-build-image
 docker run -v$PWD:$PWD -w $PWD arvados/fpm make packages
 
diff --git a/tools/run-integration-tests.sh b/tools/run-integration-tests.sh index 68e8a560..09cb2518 100755 --- a/tools/run-integration-tests.sh +++ b/tools/run-integration-tests.sh @@ -74,7 +74,7 @@ if [ ! -f ${ARVADOS_CONF} ]; then fi if [ -f "${WB2_DIR}/public/config.json" ]; then - echo "ERROR: Cannot run with Workbench2's public/config.json file" + echo "ERROR: Please move public/config.json file out of the way" exit 1 fi -- 2.30.2