summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/sasl_no_dir
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-11-12 21:22:24 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-11-12 21:22:24 +0000
commit780a3211d2b7a098455a6d8ec00067e6958119ba (patch)
tree1a8922d6e23fa3141dc8555de17a7cc8bc59c6ee /qpid/cpp/src/tests/sasl_no_dir
parent0630ea05003e6c530b9dde889e8296b12e67e41b (diff)
downloadqpid-python-780a3211d2b7a098455a6d8ec00067e6958119ba.tar.gz
QPID-5330: Simplify testing for presence of python testing code -
this makes it much easier not to call the python testing code when it isn't available git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1541241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/sasl_no_dir')
-rwxr-xr-xqpid/cpp/src/tests/sasl_no_dir116
1 files changed, 2 insertions, 114 deletions
diff --git a/qpid/cpp/src/tests/sasl_no_dir b/qpid/cpp/src/tests/sasl_no_dir
index 5d657deb3a..4d3863fa26 100755
--- a/qpid/cpp/src/tests/sasl_no_dir
+++ b/qpid/cpp/src/tests/sasl_no_dir
@@ -19,14 +19,12 @@
# under the License.
#
-source ./test_env.sh
-
script_name=`basename $0`
# This minimum value corresponds to sasl version 2.1.22
minimum_sasl_version=131350
-sasl_version=`$QPID_TEST_EXEC_DIR/sasl_version`
+sasl_version=$($QPID_TEST_EXEC_DIR/sasl_version)
# This test is necessary because this sasl version is the first one that permits
# redirection of the sasl config file path.
@@ -36,7 +34,7 @@ if [ "$sasl_version" -lt "$minimum_sasl_version" ]; then
fi
-sasl_config_dir=$builddir/sasl_config
+sasl_config_dir=$QPID_TEST_EXEC_DIR/sasl_config
# Debugging print. --------------------------
@@ -106,113 +104,3 @@ rm -rf $tmp_root
print "result: fail"
exit 1
-
-#! /bin/bash
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-source ./test_env.sh
-
-script_name=`basename $0`
-
-# This minimum value corresponds to sasl version 2.1.22
-minimum_sasl_version=131350
-
-sasl_version=`$QPID_TEST_EXEC_DIR/sasl_version`
-
-# This test is necessary because this sasl version is the first one that permits
-# redirection of the sasl config file path.
-if [ "$sasl_version" -lt "$minimum_sasl_version" ]; then
- echo "sasl_fed: must have sasl version 2.1.22 or greater. ( Integer value: $minimum_sasl_version ) Version is: $sasl_version"
- exit 0
-fi
-
-
-sasl_config_dir=$builddir/sasl_config
-
-
-# Debugging print. --------------------------
-debug=
-function print {
- if [ "$debug" ]; then
- echo "${script_name}: $1"
- fi
-}
-
-
-my_random_number=$RANDOM
-tmp_root=/tmp/sasl_fed_$my_random_number
-mkdir -p $tmp_root
-
-
-LOG_FILE=$tmp_root/qpidd.log
-
-# If you want to see this test fail, just comment out this 'mv' command.
-print "Moving sasl configuration dir."
-mv ${sasl_config_dir} ${sasl_config_dir}-
-
-
-#--------------------------------------------------
-print " Starting broker"
-#--------------------------------------------------
-$QPIDD_EXEC \
- -p 0 \
- --no-data-dir \
- --auth=yes \
- --mgmt-enable=yes \
- --log-enable info+ \
- --log-source yes \
- --log-to-file ${LOG_FILE} \
- --sasl-config=$sasl_config_dir \
- -d 2> /dev/null 1> $tmp_root/broker_port
-
-
-
-# If it works right, the output will look something like this: ( two lines long )
-# Daemon startup failed: SASL: sasl_set_path failed: no such directory: /home/mick/trunk/qpid/cpp/src/tests/sasl_config (qpid/broker/SaslAuthenticator.cpp:112)
-# 2011-10-13 14:07:00 critical qpidd.cpp:83: Unexpected error: Daemon startup failed: SASL: sasl_set_path failed: no such directory: /home/mick/trunk/qpid/cpp/src/tests/sasl_config (qpid/broker/SaslAuthenticator.cpp:112)
-
-result=`cat ${LOG_FILE} | grep "sasl_set_path failed: no such directory" | wc -l `
-
-#--------------------------------------------------
-print "Restore the Sasl config dir to its original place."
-#--------------------------------------------------
-mv ${sasl_config_dir}- ${sasl_config_dir}
-
-if [ "2" -eq ${result} ]; then
- print "result: success"
- rm -rf $tmp_root
- exit 0
-fi
-
-
-# If this test fails, the broker is still alive.
-# Kill it.
-broker_port=`cat $tmp_root/broker_port`
-#--------------------------------------------------
-print "Asking broker to quit."
-#--------------------------------------------------
-$QPIDD_EXEC --port $broker_port --quit
-
-rm -rf $tmp_root
-
-print "result: fail"
-exit 1
-