From 05fdb4b165a3f9bb5b1a13b2d03e56d837f10f9d Mon Sep 17 00:00:00 2001
From: Benjamin Wenger <ben@elixxir.ioo>
Date: Fri, 11 Sep 2020 15:53:02 -0700
Subject: [PATCH] added a testing implementation of new manager

---
 connect/manager.go | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/connect/manager.go b/connect/manager.go
index bcc2a93..8678d61 100644
--- a/connect/manager.go
+++ b/connect/manager.go
@@ -15,6 +15,7 @@ import (
 	jww "github.com/spf13/jwalterweatherman"
 	"gitlab.com/elixxir/primitives/id"
 	"sync"
+	"testing"
 )
 
 // The Manager object provides thread-safe access
@@ -32,6 +33,13 @@ func newManager() *Manager {
 	}
 }
 
+func NewManagerTesting(t *testing.T) *Manager {
+	if t == nil {
+		jww.FATAL.Panicf("NewMangerTesting is for testing only")
+	}
+	return newManager()
+}
+
 // Fetch a Host from the internal map
 func (m *Manager) GetHost(hostId *id.ID) (*Host, bool) {
 	m.mux.RLock()
-- 
GitLab