summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/ipv6_test
diff options
context:
space:
mode:
authorJustin Ross <jross@apache.org>2016-04-21 12:31:34 +0000
committerJustin Ross <jross@apache.org>2016-04-21 12:31:34 +0000
commit71149592670f7592886751a9a866459bef0f12cc (patch)
treee4d1fd948055e36d1560112a318e77a210506d06 /qpid/cpp/src/tests/ipv6_test
parenta835fb2724824dcd8a470fb51424cedeb6b38f62 (diff)
downloadqpid-python-71149592670f7592886751a9a866459bef0f12cc.tar.gz
QPID-7207: Create independent cpp and python subtrees, with content from tools and extras
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1740289 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/ipv6_test')
-rwxr-xr-xqpid/cpp/src/tests/ipv6_test120
1 files changed, 0 insertions, 120 deletions
diff --git a/qpid/cpp/src/tests/ipv6_test b/qpid/cpp/src/tests/ipv6_test
deleted file mode 100755
index 4ac5f95fba..0000000000
--- a/qpid/cpp/src/tests/ipv6_test
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/usr/bin/env 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.
-#
-
-# Check whether we have any globally configured IPv6 addresses
-# - if not then we can't run the tests because ipv6 lookups won't
-# work within the qpid code. This is a deliberate feature to avoid
-# getting addresses that can't be routed by the machine.
-
-if ip -f inet6 -o addr | cut -f 9 -s -d' ' | grep global > /dev/null ; then
- echo "IPv6 addresses configured continuing"
-else
- echo "No global IPv6 addresses configured - skipping test"
- exit 0
-fi
-
-
-# Run a simple test over IPv6
-source $QPID_TEST_COMMON
-
-CONFIG=$(dirname $0)/config.null
-TEST_HOSTNAME=::1
-COUNT=10
-
-trap cleanup EXIT
-
-error() { echo $*; exit 1; }
-
-# Don't need --no-module-dir or --no-data-dir as they are set as env vars in test_env.sh
-COMMON_OPTS="--interface [::1] --daemon --auth no --config $CONFIG"
-
-# Record all broker ports started
-unset PORTS
-declare -a PORTS
-
-# Start new brokers:
-# $1 must be integer
-# $2 = extra opts
-# Append used ports to PORTS variable
-start_brokers() {
- local -a ports
- for (( i=0; $i<$1; i++)) do
- ports[$i]=$($QPIDD_EXEC --port 0 $COMMON_OPTS $2)
- done
- PORTS=( ${PORTS[@]} ${ports[@]} )
-}
-
-stop_brokers() {
- for port in "${PORTS[@]}";
- do
- $QPIDD_EXEC -qp $port
- done
- PORTS=()
-}
-
-cleanup() {
- stop_brokers
-}
-
-start_brokers 1
-PORT=${PORTS[0]}
-echo "Started IPv6 smoke perftest on broker port $PORT"
-
-## Test connection via connection settings
-./qpid-perftest --count ${COUNT} --port ${PORT} -b $TEST_HOSTNAME --summary
-
-## Test connection with a URL
-URL="amqp:[$TEST_HOSTNAME]:$PORT"
-
-./qpid-send -b $URL --content-string=hello -a "foo;{create:always}"
-MSG=`./qpid-receive -b $URL -a "foo;{create:always}" --messages 1`
-test "$MSG" = "hello" || { echo "receive failed '$MSG' != 'hello'"; exit 1; }
-
-stop_brokers
-
-# Federation smoke test follows
-
-# Start 2 brokers
-
-# In a distribution, the python tools will be absent.
-ensure_python_tests
-
-start_brokers 2
-echo "Started Federated brokers on ports ${PORTS[*]}"
-# Make broker urls
-BROKER0="[::1]:${PORTS[0]}"
-BROKER1="[::1]:${PORTS[1]}"
-TEST_QUEUE=ipv6-fed-test
-
-$QPID_CONFIG_EXEC -b $BROKER0 add queue $TEST_QUEUE
-$QPID_CONFIG_EXEC -b $BROKER1 add queue $TEST_QUEUE
-$QPID_ROUTE_EXEC dynamic add $BROKER1 $BROKER0 amq.direct
-$QPID_CONFIG_EXEC -b $BROKER1 bind amq.direct $TEST_QUEUE $TEST_QUEUE
-$QPID_ROUTE_EXEC route map $BROKER1
-
-./datagen --count 100 | tee rdata-in |
- ./qpid-send -b amqp:$BROKER0 -a amq.direct/$TEST_QUEUE --content-stdin
-./qpid-receive -b amqp:$BROKER1 -a $TEST_QUEUE --print-content yes -m 0 > rdata-out
-
-cmp rdata-in rdata-out || { echo "Federated data over IPv6 does not compare"; exit 1; }
-
-stop_brokers
-rm rdata-in rdata-out