pepov caa71fce92 NIFI-5247 nifi-toolkit bash entry points should leverage exec to replace bash with the current java process in order to handle signals properly in docker.
- Also add bash, openssl, jq to make certificate request operations easier
 - Move project.version to the build config from the Dockerfile, use target/ folder for the build dependency
 - Docker integration tests for checking exit codes and tls-toolkit basic server-client interaction

This closes #2746.
2018-06-01 13:20:33 -04:00

36 lines
916 B
Bash
Executable File

#!/bin/bash
set -xuo pipefail
VERSION=${1:-}
IMAGE=apache/nifi-toolkit:${VERSION}
echo "Testing return values on missing input:"
docker run --rm $IMAGE
test 0 -eq $? || exit 1
echo "Testing return values on invalid input for all commands:"
docker run --rm $IMAGE encrypt-config invalid 1>/dev/null 2>&1
test 2 -eq $? || exit 1
docker run --rm $IMAGE s2s invalid 1>/dev/null 2>&1
test 0 -eq $? || exit 1
docker run --rm $IMAGE zk-migrator invalid 1>/dev/null 2>&1
test 0 -eq $? || exit 1
docker run --rm $IMAGE node-manager invalid 1>/dev/null 2>&1
test 1 -eq $? || exit 1
docker run --rm $IMAGE cli invalid 1>/dev/null 2>&1
test 255 -eq $? || exit 1
docker run --rm $IMAGE tls-toolkit invalid 1>/dev/null 2>&1
test 2 -eq $? || exit 1
docker run --rm $IMAGE file-manager invalid 1>/dev/null 2>&1
test 1 -eq $? || exit 1
docker run --rm $IMAGE flow-analyzer invalid 1>/dev/null 2>&1
test 1 -eq $? || exit 1