From 21db36bc7013d38f70bc15b266290ad8e57da76d Mon Sep 17 00:00:00 2001
From: willcarter <will@privategrity.com>
Date: Mon, 19 Mar 2018 09:19:54 -0700
Subject: [PATCH] Modified integration test to use nicknames. This inserts
 GetContactList functionality into the integration tests.

---
 basice2e/clients.goldoutput/client12.out |  8 ++++----
 basice2e/clients.goldoutput/client23.out |  8 ++++----
 basice2e/clients.goldoutput/client34.out |  8 ++++----
 basice2e/clients.goldoutput/client41.out |  8 ++++----
 basice2e/run.sh                          | 11 ++++++++---
 5 files changed, 24 insertions(+), 19 deletions(-)

diff --git a/basice2e/clients.goldoutput/client12.out b/basice2e/clients.goldoutput/client12.out
index f468d1b..59c38dc 100644
--- a/basice2e/clients.goldoutput/client12.out
+++ b/basice2e/clients.goldoutput/client12.out
@@ -1,4 +1,4 @@
-Sending Message to 2: Hello, 2
-Message from 4 Received: Hello, 1
-Sending Message to 2: Hello, 2
-Message from 4 Received: Hello, 1
+Sending Message to 2, Jim: Hello, 2
+Message from 4, Rick Received: Hello, 1
+Sending Message to 2, Jim: Hello, 2
+Message from 4, Rick Received: Hello, 1
diff --git a/basice2e/clients.goldoutput/client23.out b/basice2e/clients.goldoutput/client23.out
index 05ffbe6..f978dc8 100644
--- a/basice2e/clients.goldoutput/client23.out
+++ b/basice2e/clients.goldoutput/client23.out
@@ -1,4 +1,4 @@
-Sending Message to 3: Hello, 3
-Message from 1 Received: Hello, 2
-Sending Message to 3: Hello, 3
-Message from 1 Received: Hello, 2
+Sending Message to 3, Ben: Hello, 3
+Message from 1, David Received: Hello, 2
+Sending Message to 3, Ben: Hello, 3
+Message from 1, David Received: Hello, 2
diff --git a/basice2e/clients.goldoutput/client34.out b/basice2e/clients.goldoutput/client34.out
index 00965b6..535a51f 100644
--- a/basice2e/clients.goldoutput/client34.out
+++ b/basice2e/clients.goldoutput/client34.out
@@ -1,4 +1,4 @@
-Sending Message to 4: Hello, 4
-Message from 2 Received: Hello, 3
-Sending Message to 4: Hello, 4
-Message from 2 Received: Hello, 3
+Sending Message to 4, Rick: Hello, 4
+Message from 2, Jim Received: Hello, 3
+Sending Message to 4, Rick: Hello, 4
+Message from 2, Jim Received: Hello, 3
diff --git a/basice2e/clients.goldoutput/client41.out b/basice2e/clients.goldoutput/client41.out
index a249345..df9a4f6 100644
--- a/basice2e/clients.goldoutput/client41.out
+++ b/basice2e/clients.goldoutput/client41.out
@@ -1,4 +1,4 @@
-Sending Message to 1: Hello, 1
-Message from 3 Received: Hello, 4
-Sending Message to 1: Hello, 1
-Message from 3 Received: Hello, 4
+Sending Message to 1, David: Hello, 1
+Message from 3, Ben Received: Hello, 4
+Sending Message to 1, David: Hello, 1
+Message from 3, Ben Received: Hello, 4
diff --git a/basice2e/run.sh b/basice2e/run.sh
index ba12502..10d5efb 100755
--- a/basice2e/run.sh
+++ b/basice2e/run.sh
@@ -46,7 +46,10 @@ sleep 20 # FIXME: We should not need this, but the servers don't respond quickly
          #        enough on boot right now.
 
 LASTNODE="localhost:50004"
-
+NICK1="David"
+NICK2="Jim"
+NICK3="Ben"
+NICK4="Rick"
 
 echo "STARTING CLIENTS..."
 CTR=0
@@ -60,7 +63,8 @@ do
     for nid in 1
     do
         nid=$((($cid % 4) + 1))
-        CLIENTCMD="../bin/client -f blob$cid$nid --numnodes 5 -s $LASTNODE -i $cid -d $nid -m \"Hello, $nid\""
+        NICK=NICK${cid}
+        CLIENTCMD="../bin/client -f blob$cid$nid --numnodes 5 -s $LASTNODE -i $cid -d $nid -m \"Hello, $nid\" --nick ${!NICK}"
         eval $CLIENTCMD >> $CLIENTOUT/client$cid$nid.out 2>&1 &
         RETVAL=$!
         eval CLIENTS${CTR}=$RETVAL
@@ -86,7 +90,8 @@ do
     for nid in 1
     do
         nid=$((($cid % 4) + 1))
-        CLIENTCMD="../bin/client -f blob$cid$nid --numnodes 5 -s $LASTNODE -i $cid -d $nid -m \"Hello, $nid\""
+        NICK=NICK${cid}
+        CLIENTCMD="../bin/client -f blob$cid$nid --numnodes 5 -s $LASTNODE -i $cid -d $nid -m \"Hello, $nid\" --nick ${!NICK}"
         eval $CLIENTCMD >> $CLIENTOUT/client$cid$nid.out 2>&1 &
         RETVAL=$!
         eval CLIENTS${CTR}=$RETVAL
-- 
GitLab