From cf0fea46d69b6b9ed9d24dd1a7219171596635be Mon Sep 17 00:00:00 2001
From: josh <josh@elixxir.io>
Date: Thu, 22 Apr 2021 16:32:10 -0700
Subject: [PATCH] Fix issue in test

---
 network/gateway/hostpool_test.go | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/network/gateway/hostpool_test.go b/network/gateway/hostpool_test.go
index 0ecb6784a..6c6feff09 100644
--- a/network/gateway/hostpool_test.go
+++ b/network/gateway/hostpool_test.go
@@ -9,7 +9,6 @@ package gateway
 
 import (
 	"fmt"
-	jww "github.com/spf13/jwalterweatherman"
 	"gitlab.com/elixxir/client/storage"
 	"gitlab.com/elixxir/comms/network"
 	"gitlab.com/elixxir/crypto/fastRNG"
@@ -824,15 +823,9 @@ func TestHostPool_RemoveGateway(t *testing.T) {
 		t.Errorf("Failed to unmarshal ID in mock ndf: %v", err)
 	}
 
-	// Add the new gateway host
-	h, err := hostPool.manager.AddHost(gwId, "", nil, params.HostParams)
-	if err != nil {
-		jww.ERROR.Printf("Could not add gateway host %s: %+v", gwId, err)
-	}
-
 	// Manually add host information
-	hostPool.hostMap[*gwId] = uint32(ndfIndex)
-	hostPool.hostList[ndfIndex] = h
+	 hostPool.addGateway(gwId, ndfIndex)
+
 
 	// Call the removal
 	hostPool.removeGateway(gwId)
-- 
GitLab