From 43b3545e1903714e419beccad2c2329248d8b7a2 Mon Sep 17 00:00:00 2001
From: Spencer Brown <spencer@privategrity.com>
Date: Thu, 10 May 2018 16:36:25 -0700
Subject: [PATCH] Run integration test against channelbot repo

---
 .gitlab-ci.yml  |  1 +
 basice2e/run.sh |  2 +-
 build.sh        | 20 ++++++++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100755 build.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f8c1277..701c909 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -48,6 +48,7 @@ installbinaries:
     - chmod +x bin/server
     - "curl -f -L -H \"PRIVATE-TOKEN: $PATKEY\" -o bin/client $CLIENT_URL"
     - chmod +x bin/client
+    - "curl -f -L -H \"PRIVATE-TOKEN: $PATKEY\" -o bin/channelbot $CHANNELBOT_URL"
     - echo $PWD
     - find bin/ -type f -exec file {} \;
   artifacts:
diff --git a/basice2e/run.sh b/basice2e/run.sh
index 2f5f514..dd440cd 100755
--- a/basice2e/run.sh
+++ b/basice2e/run.sh
@@ -90,7 +90,7 @@ runclients() {
 }
 
 # Start a channelbot server
-CHANNELCMD="../bin/client channelbot -v -i 31 --nick \"#General\" --numnodes 5 -s $LASTNODE  -f blobchannel --noratchet"
+CHANNELCMD="../bin/channelbot -v -i 31 --nick \"#General\" --numnodes 5 -s $LASTNODE  -f blobchannel --noratchet"
 eval $CHANNELCMD >> $CHANNELOUT 2>&1 &
 PIDVAL=$!
 echo $PIDVAL >> results/serverpids
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..1ef9d51
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# This intended for manually running the integration tests on your own machine
+# and assumes that you've cloned the Go repos to your GOPATH and updated them
+# with Glide.
+
+pushd $GOPATH/src/gitlab.com/privategrity/client
+go build
+popd
+mv $GOPATH/src/gitlab.com/privategrity/client/client bin
+
+pushd $GOPATH/src/gitlab.com/privategrity/server
+go build
+popd
+mv $GOPATH/src/gitlab.com/privategrity/server/server bin
+
+pushd $GOPATH/src/gitlab.com/privategrity/channelbot
+go build
+popd
+mv $GOPATH/src/gitlab.com/privategrity/channelbot/channelbot bin
-- 
GitLab