Skip to content

Commit

Permalink
tweakTestScript
Browse files Browse the repository at this point in the history
  • Loading branch information
monopole committed May 16, 2018
1 parent 5a31972 commit f1839cc
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions demos/integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,20 @@ go install github.com/kubernetes-sigs/kustomize || \
{ exit_with "Failed to install kustomize"; }
export PATH=$GOPATH/bin:$PATH

home=`pwd`

### LDAP TEST ###
demo_dir="./demos/ldap"
if [ ! -d ${demo_dir} ]; then
exit_with "directory ${demo_dir} doesn't exist"
fi

test_script="${demo_dir}/integration_test.sh"

if [ -x "${test_script}" ]; then
${test_script} ${demo_dir}/base
if [ $? -eq 0 ]; then
echo "testing ${demo_dir} passed."
else
exit_with "testing ${demo_dir} failed."
function runTest {
local script=$1
shift
local args=$@

if [ ! -x "$script" ]; then
exit_with "Unable to run $script"
fi

$script "$args"
if [ $? -ne 0 ]; then
exit_with "Failed: $script $args"
fi
else
exit_with "Unable to run ${test_script}"
fi
#################
echo "$script passed."
}

runTest ldap/integration_test.sh ldap/base

0 comments on commit f1839cc

Please sign in to comment.