Skip to content
Snippets Groups Projects
Commit b80e5fe3 authored by Josh Brooks's avatar Josh Brooks
Browse files

Add integration test for connections

parent fc1a0977
No related branches found
No related tags found
2 merge requests!68Master merge,!28Add integration test for connections
Established connection server, begin listening...
Established connection with partner
Received message: Hello 200 from 201, using connections
Sending connection request
Established connection with partner
Sent message "Hello 200 from 201, using connections" to connection partner.
Sending connection request
Established connection with partner
Disconnecting from connection partner
Disconnected from partner
\ No newline at end of file
Established connection server, begin listening for authentication...
Authenticated connection established
Received authenticated connection from client
Established connection with partner awaiting authentication...
Received message: Hello 202 from 203, using connections
Shutting down connection server
Sending connection request
Established connection with partner.
Sent message "Hello 202 from 203, using connections" to connection partner.
Sending connection request
Established connection with partner.
Disconnecting from connection partner
Disconnected from partner
......@@ -37,6 +37,7 @@ CLIENTGROUPOPTS="--password hello --waitTimeout 600 --ndf results/ndf.json -v $D
CLIENTFILETRANSFEROPTS="--password hello --waitTimeout 600 --ndf results/ndf.json -v $DEBUGLEVEL"
CLIENTREKEYOPTS="--password hello --ndf results/ndf.json --verify-sends --waitTimeout 420 --unsafe-channel-creation -v $DEBUGLEVEL"
CLIENTBACKUPOPTS="--password hello --ndf results/ndf.json -v $DEBUGLEVEL"
CONNECTIONOPTS="--password hello --waitTimeout 90 --ndf results/ndf.json -v $DEBUGLEVEL"
mkdir -p $SERVERLOGS
mkdir -p $GATEWAYLOGS
......@@ -850,7 +851,7 @@ then
eval $CLIENTCMD >> $CLIENTOUT/client31.txt || true &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client13.log -s blob13 --destfile $CLIENTOUT/josh31.bin --sendCount 5 --receiveCount 5 -m \"Hello from Josh13, with E2E Encryption\""
CLIENTCMD="timeout 240s ../bin/client $CLIENTOPTS -l $CLIENTOUT/client13.log -s blob13 --destfiledestfiledestfile $CLIENTOUT/josh31.bin --sendCount 5 --receiveCount 5 -m \"Hello from Josh13, with E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client13.txt || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
......@@ -1107,6 +1108,66 @@ wait $PIDVAL1
wait $PIDVAL2
echo "FILE TRANSFER FINISHED..."
###############################################################################
# Test connections
###############################################################################
echo "TESTING CONNECTIONS..."
# Initiate server
CLIENTCMD="timeout 240s ../bin/client connection -s blob200 $CONNECTIONOPTS --writeContact $CLIENTOUT/client200-server.bin -l $CLIENTOUT/client200.log --startServer --serverTimeout 1m15s"
eval $CLIENTCMD > $CLIENTOUT/client200.txt 2>&1 || true &
PIDVAL1=$!
echo "$CLIENTCMD -- $PIDVAL1"
echo "Sleeping to ensure connection server instantiation"
sleep 5
# Initiate client and send message to server
CLIENTCMD="timeout 240s ../bin/client connection -s blob201 --connect $CLIENTOUT/client200-server.bin $CONNECTIONOPTS -l $CLIENTOUT/client201.log -m \"Hello 200 from 201, using connections\" --receiveCount 0"
eval $CLIENTCMD > $CLIENTOUT/client201.txt 2>&1 || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL2
# Disconnect
CLIENTCMD="timeout 240s ../bin/client connection -s blob201 $CONNECTIONOPTS -l $CLIENTOUT/client201.log --connect $CLIENTOUT/client200-server.bin --disconnect"
eval $CLIENTCMD >> $CLIENTOUT/client201.txt 2>&1 || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL2
wait $PIDVAL1
echo "CONNECTION TESTS FINISHED"
###############################################################################
# Test authenticated connections
###############################################################################
echo "TESTING AUTHENTICATED CONNECTIONS..."
# Initiate server
CLIENTCMD="timeout 240s ../bin/client connection -s blob202 --authenticated $CONNECTIONOPTS --writeContact $CLIENTOUT/client202-server.bin -l $CLIENTOUT/client202.log --startServer --serverTimeout 1m15s"
eval $CLIENTCMD > $CLIENTOUT/client202.txt 2>&1 || true &
PIDVAL1=$!
echo "$CLIENTCMD -- $PIDVAL1"
echo "Sleeping to ensure connection server instantiation"
sleep 5
# Initiate client and send message to server
CLIENTCMD="timeout 240s ../bin/client connection -s blob203 --authenticated --connect $CLIENTOUT/client202-server.bin $CONNECTIONOPTS -l $CLIENTOUT/client203.log -m \"Hello 202 from 203, using connections\" --receiveCount 0"
eval $CLIENTCMD > $CLIENTOUT/client203.txt 2>&1 || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL2
# Disconnect
CLIENTCMD="timeout 240s ../bin/client connection -s blob203 --authenticated $CONNECTIONOPTS -l $CLIENTOUT/client203.log --connect $CLIENTOUT/client202-server.bin --disconnect"
eval $CLIENTCMD >> $CLIENTOUT/client203.txt 2>&1 || true &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL2"
wait $PIDVAL2
wait $PIDVAL1
echo "AUTHENTICATED CONNECTION TESTS FINISHED"
echo "TESTS EXITED SUCCESSFULLY, CHECKING OUTPUT..."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment