MINIFICPP-1406 Check for swig dependency for docker integration tests

Signed-off-by: Arpad Boda <aboda@apache.org>

This closes #936
diff --git a/docker/DockerVerify.sh b/docker/DockerVerify.sh
index 006e96f..f4efbc9 100755
--- a/docker/DockerVerify.sh
+++ b/docker/DockerVerify.sh
@@ -23,7 +23,7 @@
   exit 1
 fi
 
-docker_dir="$( cd ${0%/*} && pwd )"
+docker_dir="$( cd "${0%/*}" && pwd )"
 
 export MINIFI_VERSION=$1
 
@@ -34,6 +34,7 @@
 fi
 
 echo "Activating virtual environment..." 1>&2
+# shellcheck disable=SC1091
 . ./test-env-py3/bin/activate
 pip install --trusted-host pypi.python.org --upgrade pip setuptools
 
@@ -43,9 +44,17 @@
 # hint include/library paths if homewbrew is in use
 if brew list 2> /dev/null | grep openssl > /dev/null 2>&1; then
   echo "Using homebrew paths for openssl" 1>&2
-  export LDFLAGS="-L$(brew --prefix openssl)/lib"
-  export CFLAGS="-I$(brew --prefix openssl)/include"
-  export SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include"
+  LDFLAGS="-L$(brew --prefix openssl)/lib"
+  export LDFLAGS
+  CFLAGS="-I$(brew --prefix openssl)/include"
+  export CFLAGS
+  SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include"
+  export SWIG_FEATURES
+fi
+
+if ! command swig -version &> /dev/null; then
+  echo "Swig could not be found on your system (dependency of m2crypto python library). Please install swig to continue."
+  exit 1
 fi
 
 pip install --upgrade \
@@ -54,9 +63,12 @@
             PyYAML \
             m2crypto \
             watchdog
-export JAVA_HOME="/usr/lib/jvm/default-jvm"
-export PATH="$PATH:/usr/lib/jvm/default-jvm/bin"
+JAVA_HOME="/usr/lib/jvm/default-jvm"
+export JAVA_HOME
+PATH="$PATH:/usr/lib/jvm/default-jvm/bin"
+export PATH
 
-export PYTHONPATH="${PYTHONPATH}:${docker_dir}/test/integration"
+PYTHONPATH="${PYTHONPATH}:${docker_dir}/test/integration"
+export PYTHONPATH
 
 exec pytest -s -v "${docker_dir}"/test/integration
diff --git a/docker/test/integration/README.md b/docker/test/integration/README.md
index 1cb6625..e4fb628 100644
--- a/docker/test/integration/README.md
+++ b/docker/test/integration/README.md
@@ -21,7 +21,16 @@
 
 * Currently test_https.py does not work due to the upgrade to NiFi 1.7. This will be resolved as
   soon as possible.
-  
+
+## Test environment
+
+The test framework is written in Python 3 and uses pip3 to add required packages.
+
+The tests use docker containers so docker engine should be installed on your system. Check the [get docker](https://docs.docker.com/get-docker/) page for further information.
+
+One of the required python packages is the `m2crypto` package which depends on `swig` for compilation,
+so `swig` should also be installed on your system (e.g. `sudo apt install swig` on debian based systems).
+
 ## Test Execution Lifecycle
 
 Each test involves the following stages as part of its execution lifecycle:
@@ -131,7 +140,7 @@
 ```
 
 Note that a docker cluster must be created inside of a *with* structure to
-ensure that all resources are ccreated and destroyed cleanly. 
+ensure that all resources are created and destroyed cleanly.
 
 ### Insertion of test input data
 
@@ -217,4 +226,3 @@
   ...
   assert cluster.check_output()
 ```
-