16029: Add 'make integration-tests-in-docker' 16029-cypress-testing
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 23 Apr 2020 16:32:38 +0000 (12:32 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 23 Apr 2020 16:32:38 +0000 (12:32 -0400)
Also update README

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

Makefile
README.md
tools/run-integration-tests.sh

index bb09fb2f3476ee3ed23a3c9fa9252f6f8602acbd..4a8854c3fbfd479e08e94b4073cbb4bc986c6522 100644 (file)
--- 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 .)
index 8e720520aa4dec15d6ab089cd46b551d0235d794..38a26e54bf6a39399a3a46c349abdeb028c73ca6 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,10 +14,21 @@ Install [redux-devtools-extension](https://chrome.google.com/webstore/detail/red
 ### Start project
 <code>yarn start</code>
 
-### Run tests
+### Run unit tests
 <pre>
-yarn install
-yarn test
+make unit-tests
+</pre>
+
+### Run end-to-end tests
+
+<pre>
+make integration-tests
+</pre>
+
+### Run end-to-end tests in a Docker container
+
+<pre>
+make integration-tests-in-docker
 </pre>
 
 ### Production build
@@ -28,7 +39,7 @@ yarn build
 
 ### Package build
 <pre>
-docker build -t arvados/fpm .
+make workbench2-build-image
 docker run -v$PWD:$PWD -w $PWD arvados/fpm make packages
 </pre>
 
index 68e8a560772f78a4fd2c61478f482d155fb93bc2..09cb25188f77a89819451bf6bac6025d1e4e67d2 100755 (executable)
@@ -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