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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
integration
Commits
f231a98f
Commit
f231a98f
authored
Feb 2, 2021
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Finalized integration test when running against arbitrary network
parent
b33675d6
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
basice2e/run.sh
+224
-181
224 additions, 181 deletions
basice2e/run.sh
with
224 additions
and
181 deletions
basice2e/run.sh
+
224
−
181
View file @
f231a98f
...
@@ -12,6 +12,17 @@ rm server-5.qdrep || true
...
@@ -12,6 +12,17 @@ rm server-5.qdrep || true
mkdir
-p
.elixxir
mkdir
-p
.elixxir
if
[
$#
-gt
1
]
then
echo
"usage:
$0
[permsip:port]"
exit
fi
PERMISSIONING
=
$1
#export GRPC_GO_LOG_VERBOSITY_LEVEL=99
#export GRPC_GO_LOG_VERBOSITY_LEVEL=99
#export GRPC_GO_LOG_SEVERITY_LEVEL=info
#export GRPC_GO_LOG_SEVERITY_LEVEL=info
...
@@ -22,14 +33,16 @@ DUMMYOUT=results/dummy-console.txt
...
@@ -22,14 +33,16 @@ DUMMYOUT=results/dummy-console.txt
UDBOUT
=
results/udb-console.txt
UDBOUT
=
results/udb-console.txt
CLIENTCLEAN
=
results/clients-cleaned
CLIENTCLEAN
=
results/clients-cleaned
CLIENTOPTS
=
"--password hello --ndf ndf.json --waitTimeout 90 --unsafe-channel-creation --verbose"
CLIENTOPTS
=
"--password hello --ndf
results/
ndf.json --waitTimeout 90 --unsafe-channel-creation --verbose"
CLIENTUDOPTS
=
"--password hello --ndf ndf.json --verbose"
CLIENTUDOPTS
=
"--password hello --ndf
results/
ndf.json --verbose"
mkdir
-p
$SERVERLOGS
mkdir
-p
$SERVERLOGS
mkdir
-p
$GATEWAYLOGS
mkdir
-p
$GATEWAYLOGS
mkdir
-p
$CLIENTOUT
mkdir
-p
$CLIENTOUT
mkdir
-p
$CLIENTCLEAN
mkdir
-p
$CLIENTCLEAN
if
[
"
$PERMISSIONING
"
==
""
]
then
echo
"STARTING SERVERS..."
echo
"STARTING SERVERS..."
UDBID
=
$(
../bin/client init
-s
results/udbsession
-l
results/udbidgen.log
--password
hello
--ndf
ndf.json
)
UDBID
=
$(
../bin/client init
-s
results/udbsession
-l
results/udbidgen.log
--password
hello
--ndf
ndf.json
)
...
@@ -110,8 +123,6 @@ while [ ! -s rid.txt ] && [ $cnt -lt 120 ]; do
...
@@ -110,8 +123,6 @@ while [ ! -s rid.txt ] && [ $cnt -lt 120 ]; do
echo
-n
"."
echo
-n
"."
done
done
echo
"DONE LETS DO STUFF"
# Start a user discovery bot server
# Start a user discovery bot server
echo
"STARTING UDB..."
echo
"STARTING UDB..."
UDBCMD
=
"../bin/udb --logLevel 3 --config udb.yaml -l 1 --devMode"
UDBCMD
=
"../bin/udb --logLevel 3 --config udb.yaml -l 1 --devMode"
...
@@ -119,7 +130,6 @@ $UDBCMD >> $UDBOUT 2>&1 &
...
@@ -119,7 +130,6 @@ $UDBCMD >> $UDBOUT 2>&1 &
PIDVAL
=
$!
PIDVAL
=
$!
echo
$PIDVAL
>>
results/serverpids
echo
$PIDVAL
>>
results/serverpids
echo
"
$UDBCMD
--
$PIDVAL
"
echo
"
$UDBCMD
--
$PIDVAL
"
rm
rid.txt
||
true
rm
rid.txt
||
true
while
[
!
-s
rid.txt
]
&&
[
$cnt
-lt
30
]
;
do
while
[
!
-s
rid.txt
]
&&
[
$cnt
-lt
30
]
;
do
sleep
1
sleep
1
...
@@ -128,7 +138,26 @@ while [ ! -s rid.txt ] && [ $cnt -lt 30 ]; do
...
@@ -128,7 +138,26 @@ while [ ! -s rid.txt ] && [ $cnt -lt 30 ]; do
echo
-n
"."
echo
-n
"."
done
done
# sleep 5
echo
"localhost:18000"
>
results/permserver.txt
echo
"DONE LETS DO STUFF"
else
echo
"Connecting to network defined at
$PERMISSIONING
"
echo
$PERMISSIONING
>
results/permserver.txt
fi
echo
"DOWNLOADING TLS Cert..."
openssl s_client
-showcerts
-connect
$(
cat
results/permserver.txt
)
< /dev/null 2>&1 | openssl x509
-outform
PEM
>
results/permcert.pem
echo
"DOWNLOADING NDF..."
CLIENTCMD
=
"../bin/client getndf --permhost
$(
cat
results/permserver.txt
)
--cert results/permcert.pem"
eval
$CLIENTCMD
>>
results/ndf.json 2>&1 &
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
cat
results/ndf.json | jq
.
|
head
-5
echo
"RUNNING CLIENTS..."
runclients
()
{
runclients
()
{
echo
"Starting clients..."
echo
"Starting clients..."
...
@@ -164,6 +193,10 @@ runclients() {
...
@@ -164,6 +193,10 @@ runclients() {
done
done
}
}
if
[
"
$PERMISSIONING
"
==
""
]
then
echo
"RUNNING BASIC CLIENTS..."
echo
"RUNNING BASIC CLIENTS..."
runclients
runclients
echo
"RUNNING BASIC CLIENTS (2nd time)..."
echo
"RUNNING BASIC CLIENTS (2nd time)..."
...
@@ -209,7 +242,7 @@ eval $CLIENTCMD >> $CLIENTOUT/client9_rekey.txt 2>&1 || true &
...
@@ -209,7 +242,7 @@ eval $CLIENTCMD >> $CLIENTOUT/client9_rekey.txt 2>&1 || true &
PIDVAL
=
$!
PIDVAL
=
$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
||
true
wait
$PIDVAL
||
true
fi
# Non-precanned E2E user messaging
# Non-precanned E2E user messaging
echo
"SENDING E2E MESSAGES TO NEW USERS..."
echo
"SENDING E2E MESSAGES TO NEW USERS..."
...
@@ -253,6 +286,8 @@ wait $PIDVAL
...
@@ -253,6 +286,8 @@ wait $PIDVAL
wait
$PIDVAL2
wait
$PIDVAL2
if
[
"
$PERMISSIONING
"
==
""
]
then
# UD Test
# UD Test
echo
"TESTING USER DISCOVERY..."
echo
"TESTING USER DISCOVERY..."
CLIENTCMD
=
"timeout 240s ../bin/client ud
$CLIENTUDOPTS
-l
$CLIENTOUT
/client13.log -s blob13 --register josh13 --addemail josh13@elixxir.io --addphone 6178675309US"
CLIENTCMD
=
"timeout 240s ../bin/client ud
$CLIENTUDOPTS
-l
$CLIENTOUT
/client13.log -s blob13 --register josh13 --addemail josh13@elixxir.io --addphone 6178675309US"
...
@@ -293,6 +328,7 @@ PIDVAL2=$!
...
@@ -293,6 +328,7 @@ PIDVAL2=$!
echo
"
$CLIENTCMD
--
$PIDVAL
"
echo
"
$CLIENTCMD
--
$PIDVAL
"
wait
$PIDVAL
wait
$PIDVAL
wait
$PIDVAL2
wait
$PIDVAL2
fi
cp
$CLIENTOUT
/
*
.txt
$CLIENTCLEAN
/
cp
$CLIENTOUT
/
*
.txt
$CLIENTCLEAN
/
...
@@ -312,7 +348,13 @@ set -e
...
@@ -312,7 +348,13 @@ set -e
echo
"TESTS EXITED SUCCESSFULLY, CHECKING OUTPUT..."
echo
"TESTS EXITED SUCCESSFULLY, CHECKING OUTPUT..."
set
+x
set
+x
diff
-aruN
clients.goldoutput
$CLIENTCLEAN
for
C
in
$(
ls
-1
$CLIENTCLEAN
)
do
diff
-auN
clients.goldoutput/
$C
$CLIENTCLEAN
/
$C
done
if
[
"
$PERMISSIONING
"
==
""
]
then
#cat $CLIENTOUT/* | strings | grep -e "ERROR" -e "FATAL" > results/client-errors || true
#cat $CLIENTOUT/* | strings | grep -e "ERROR" -e "FATAL" > results/client-errors || true
#diff -ruN results/client-errors.txt noerrors.txt
#diff -ruN results/client-errors.txt noerrors.txt
...
@@ -326,5 +368,6 @@ IGNOREMSG="GetRoundBufferInfo: Error received: rpc error: code = Unknown desc =
...
@@ -326,5 +368,6 @@ IGNOREMSG="GetRoundBufferInfo: Error received: rpc error: code = Unknown desc =
cat
$GATEWAYLOGS
/
*
.log |
grep
-a
"ERROR"
|
grep
-av
"context"
|
grep
-av
"certificate"
|
grep
-av
"Failed to read key"
|
grep
-av
"
$IGNOREMSG
"
>
results/gateway-errors.txt
||
true
cat
$GATEWAYLOGS
/
*
.log |
grep
-a
"ERROR"
|
grep
-av
"context"
|
grep
-av
"certificate"
|
grep
-av
"Failed to read key"
|
grep
-av
"
$IGNOREMSG
"
>
results/gateway-errors.txt
||
true
cat
$GATEWAYLOGS
/
*
.log |
grep
-a
"FATAL"
|
grep
-av
"context"
|
grep
-av
"transport is closing"
>>
results/gateway-errors.txt
||
true
cat
$GATEWAYLOGS
/
*
.log |
grep
-a
"FATAL"
|
grep
-av
"context"
|
grep
-av
"transport is closing"
>>
results/gateway-errors.txt
||
true
diff
-aruN
results/gateway-errors.txt noerrors.txt
diff
-aruN
results/gateway-errors.txt noerrors.txt
fi
echo
"NO OUTPUT ERRORS, SUCCESS!"
echo
"NO OUTPUT ERRORS, SUCCESS!"
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