Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
integration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
integration
Commits
f28f7afe
Commit
f28f7afe
authored
2 years ago
by
Sydney Anne Erickson
Browse files
Options
Downloads
Patches
Plain Diff
Client session tests
parent
94c444f0
No related branches found
No related tags found
2 merge requests
!68
Master merge
,
!30
Client Session Testing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
basice2e/client-session-tests.sh
+69
-0
69 additions, 0 deletions
basice2e/client-session-tests.sh
with
69 additions
and
0 deletions
basice2e/client-session-tests.sh
0 → 100644
+
69
−
0
View file @
f28f7afe
set
-e
#set -o xtrace
rm
-rf
client
*
.log blob
*
rick
*
.bin ben
*
.bin
CLIENTOPTS
=
"--password hello --ndf results/ndf.json --sendDelay 100 --waitTimeout 360 --unsafe-channel-creation -v 1"
# --- Pre-canned messaging to self ---
timeout
240s ../bin/client
--password
hello
--ndf
results/ndf.json
--sendDelay
100
--waitTimeout
360
--unsafe-channel-creation
-v
1
-l
client9-master.log
--sendCount
2
--receiveCount
2
-s
blob9/blob9
--sendid
9
--destid
9
-m
"Hi 9->9, with E2E Encryption"
timeout
240s ../bin/client-release
--force-legacy
--password
hello
--ndf
results/ndf.json
--sendDelay
100
--waitTimeout
360
--unsafe-channel-creation
-v
1
-l
client9-release.log
--sendCount
2
--receiveCount
2
-s
blob9/blob9
--sendid
9
--destid
9
-m
"Hi 9->9, with E2E Encryption"
# --- Messaging to another use, E2E ---
# Init storage and request an E2E channel with each other
echo
"SENDING E2E MESSAGES TO NEW USERS..."
CLIENTCMD
=
"timeout 360s ../bin/client
$CLIENTOPTS
-l client42-master-init.log -s blob42 --writeContact rick42-contact.bin --unsafe -m
\"
Hello from Rick42 to myself, without E2E Encryption
\"
"
eval
$CLIENTCMD
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
CLIENTCMD
=
"timeout 360s ../bin/client
$CLIENTOPTS
-l client43-master-init.log -s blob43 --writeContact ben43-contact.bin --destfile rick42-contact.bin --send-auth-request --sendCount 0 --receiveCount 0"
eval
$CLIENTCMD
||
true
&
PIDVAL2
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
echo
"Waiting for contact files to be created..."
while
[
!
-s
ben43-contact.bin
]
;
do
sleep
1
done
# Get the user's IDs
TMPID
=
$(
cat
client42-master-init.log |
grep
-a
"User
\:
"
|
awk
-F
' '
'{print $5}'
)
RICKID
=
${
TMPID
}
echo
"RICK ID:
$RICKID
"
TMPID
=
$(
cat
client43-master-init.log |
grep
-a
"User
\:
"
|
awk
-F
' '
'{print $5}'
)
BENID
=
${
TMPID
}
echo
"BEN ID:
$BENID
"
# Confirm channel with each other
CLIENTCMD
=
"timeout 360s ../bin/client
$CLIENTOPTS
-l client42-master-confirm.log -s blob42 --destfile ben43-contact.bin --sendCount 0 --receiveCount 0"
eval
$CLIENTCMD
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
wait
$PIDVAL2
# Send 5 messages to each other
CLIENTCMD
=
"timeout 360s ../bin/client
$CLIENTOPTS
-l client42-master-send.log -s blob42 --destid b64:
$BENID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Rick42, with E2E Encryption
\"
"
eval
$CLIENTCMD
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
CLIENTCMD
=
"timeout 360s ../bin/client
$CLIENTOPTS
-l client43-master-send.log -s blob43 --destid b64:
$RICKID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Ben43, with E2E Encryption
\"
"
eval
$CLIENTCMD
||
true
&
PIDVAL2
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
wait
$PIDVAL2
# Send 5 messages to each other with new client
CLIENTCMD
=
"timeout 360s ../bin/client-release
$CLIENTOPTS
-l client42-release-send.log -s blob42 --force-legacy --destid b64:
$BENID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Rick42, with E2E Encryption
\"
"
eval
$CLIENTCMD
||
true
&
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
CLIENTCMD
=
"timeout 360s ../bin/client-release
$CLIENTOPTS
-l client43-release-send.log -s blob43 --force-legacy --destid b64:
$RICKID
--sendCount 5 --receiveCount 5 -m
\"
Hello from Ben43, with E2E Encryption
\"
"
eval
$CLIENTCMD
||
true
&
PIDVAL2
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
wait
$PIDVAL2
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment