Skip to content
Snippets Groups Projects
Commit 05fdb4b1 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

added a testing implementation of new manager

parent c574947b
Branches
Tags
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment