Skip to content
Snippets Groups Projects
Commit c906187a authored by Jonah Husson's avatar Jonah Husson
Browse files

Add goldoutputs & test for eph reg

parent dccb91ad
Branches xx-4437/no-registration
No related tags found
2 merge requests!68Master merge,!45Feature/xx 4437/no registration
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Ben602, with E2E Encryption
Message received: Hello from Rick601 to myself, without E2E Encryption
Received 0
Received 1
Received 5
Received 5
Sent: Hello from Rick601 to myself, without E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Sent: Hello from Rick601, with E2E Encryption
Adding
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Message received: Hello from Rick601, with E2E Encryption
Received 0
Received 5
Received 5
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
Sent: Hello from Ben602, with E2E Encryption
WARNING: unsafe channel creation enabled
......@@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
minRegisteredNodes: 0
# === END YAML
......@@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
minRegisteredNodes: 0
# === END YAML
......@@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
minRegisteredNodes: 0
# === END YAML
......@@ -42,4 +42,5 @@ cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
minRegisteredNodes: 0
# === END YAML
......@@ -42,4 +42,6 @@ cmixCertPath: "../keys/cmix.rip.crt"
devMode: true
minRegisteredNodes: 0
# === END YAML
......@@ -34,6 +34,7 @@ UDBOUT=results/udb-console.txt
CLIENTCLEAN=results/clients-cleaned
CLIENTOPTS="--password hello --ndf results/ndf.json --verify-sends --sendDelay 100 --waitTimeout 360 -v $DEBUGLEVEL"
CLIENTEPHREGOPTS="--password hello --ndf results/ndf.json --verify-sends --sendDelay 100 --waitTimeout 360 -v $DEBUGLEVEL --disableNodeRegistration --enableEphemeralRegistration"
CLIENTDMOPTS="--password hello --ndf results/ndf.json --waitTimeout 360 -v $DEBUGLEVEL"
CLIENTUDOPTS="--password hello --ndf results/ndf.json -v $DEBUGLEVEL"
CLIENTSINGLEOPTS="--password hello --waitTimeout 360 --ndf results/ndf.json -v $DEBUGLEVEL"
......@@ -1290,6 +1291,66 @@ wait $PIDVAL3
wait $PIDVAL2
wait $PIDVAL1
###############################################################################
# Test Ephemeral Registration (e2e test without registering with nodes)
###############################################################################
echo "TESTING E2E WITH EPHEMERAL REGISTRATION"
CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --writeContact $CLIENTOUT/rick601-contact.bin --unsafe -m \"Hello from Rick601 to myself, without E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client601.txt &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client602.log -s blob602 --writeContact $CLIENTOUT/ben602-contact.bin --destfile $CLIENTOUT/rick601-contact.bin --send-auth-request --unsafe-channel-creation --sendCount 0 --receiveCount 0"
eval $CLIENTCMD >> $CLIENTOUT/client602.txt &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
while [ ! -s $CLIENTOUT/ben602-contact.bin ]; do
sleep 1
echo -n "."
done
TMPID=$(cat $CLIENTOUT/client601.log | grep -a "User\:" | awk -F' ' '{print $5}')
RICKID=${TMPID}
echo "RICK ID: $RICKID"
TMPID=$(cat $CLIENTOUT/client602.log | grep -a "User\:" | awk -F' ' '{print $5}')
BENID=${TMPID}
echo "BEN ID: $BENID"
# Client 601 will now wait for client 602's E2E Auth channel request and confirm
CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --destfile $CLIENTOUT/ben602-contact.bin --sendCount 0 --receiveCount 0 --accept-channel --auth-timeout 360"
eval $CLIENTCMD >> $CLIENTOUT/client601.txt &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
# Test destid syntax too, note wait for 11 messages to catch the message from above ^^^
CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick601, with E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client601.txt &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client602.log -s blob602 --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben602, with E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client602.txt &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client601.log -s blob601 --destid b64:$BENID --sendCount 5 --receiveCount 5 -m \"Hello from Rick601, with E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client601.txt &
PIDVAL=$!
echo "$CLIENTCMD -- $PIDVAL"
CLIENTCMD="timeout 360s ../bin/client $CLIENTEPHREGOPTS -l $CLIENTOUT/client602.log -s blob602 --destid b64:$RICKID --sendCount 5 --receiveCount 5 -m \"Hello from Ben602, with E2E Encryption\""
eval $CLIENTCMD >> $CLIENTOUT/client602.txt &
PIDVAL2=$!
echo "$CLIENTCMD -- $PIDVAL"
wait $PIDVAL
wait $PIDVAL2
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