diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2008-10-22 03:29:32 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2008-10-22 03:29:32 +0000 |
| commit | cc44a53b4ff1d47ec14cb05246d1366a4598e814 (patch) | |
| tree | 9c4ad8c57d5dcf9db9ce3cf5df1ad767020e9e6b /cpp/src/tests/run_acl_tests | |
| parent | 8a59fb9bea93bd1ef47372948f9c544327a4418e (diff) | |
| download | qpid-python-cc44a53b4ff1d47ec14cb05246d1366a4598e814.tar.gz | |
This is for QPID-1363
These tests creates an acl file and use the acl.reloadAclFile method to reconfigure the broker.
The tests are run as part of make check
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@706850 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests/run_acl_tests')
| -rwxr-xr-x | cpp/src/tests/run_acl_tests | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/cpp/src/tests/run_acl_tests b/cpp/src/tests/run_acl_tests new file mode 100755 index 0000000000..a6a6ca160e --- /dev/null +++ b/cpp/src/tests/run_acl_tests @@ -0,0 +1,32 @@ +#!/bin/sh +# Run the acl tests. +MY_DIR=`dirname \`which $0\`` +PYTHON_DIR=${MY_DIR}/../../../python + +trap stop_brokers INT TERM QUIT + +start_brokers() { + ../qpidd --daemon --port 0 --data-dir ${MY_DIR}/data_dir --load-module ../.libs/acl.so --enforce-acl --auth no > qpidd.port + LOCAL_PORT=`cat qpidd.port` +} + +stop_brokers() { + ../qpidd -q --port $LOCAL_PORT +} + +if test -d ${PYTHON_DIR} ; then + mkdir ${MY_DIR}/data_dir + cp ${MY_DIR}/policy.acl ${MY_DIR}/data_dir/ + start_brokers + echo "Running acl tests using brokers on ports $LOCAL_PORT" + PYTHONPATH=${PYTHON_DIR} + export PYTHONPATH + ${MY_DIR}/acl.py -v -s ${MY_DIR}/../../../specs/amqp.0-10-qpid-errata.xml -b localhost:$LOCAL_PORT --port $LOCAL_PORT + RETCODE=$? + stop_brokers + if test x$RETCODE != x0; then + echo "FAIL acl tests"; exit 1; + fi + rm -rf ${MY_DIR}/data_dir +fi + |
