Skip to content
Snippets Groups Projects
Commit 6daf43d1 authored by Josh Brooks's avatar Josh Brooks
Browse files

Fix tests and documentation

parent efee2970
No related branches found
No related tags found
2 merge requests!510Release,!241Remove bad rand.Reader usage in ud/
...@@ -66,6 +66,8 @@ type Manager struct { ...@@ -66,6 +66,8 @@ type Manager struct {
// production. This is for testing with a separately deployed UD service. // production. This is for testing with a separately deployed UD service.
alternativeUd *alternateUd alternativeUd *alternateUd
// rng is a fastRNG.StreamGenerator which is used to generate random
// data. This is used for signatures for adding/removing facts.
rng *fastRNG.StreamGenerator rng *fastRNG.StreamGenerator
} }
......
...@@ -24,6 +24,7 @@ import ( ...@@ -24,6 +24,7 @@ import (
"gitlab.com/elixxir/comms/testkeys" "gitlab.com/elixxir/comms/testkeys"
"gitlab.com/elixxir/crypto/contact" "gitlab.com/elixxir/crypto/contact"
"gitlab.com/elixxir/crypto/cyclic" "gitlab.com/elixxir/crypto/cyclic"
"gitlab.com/elixxir/crypto/fastRNG"
"gitlab.com/elixxir/ekv" "gitlab.com/elixxir/ekv"
"gitlab.com/elixxir/primitives/format" "gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/comms/messages" "gitlab.com/xx_network/comms/messages"
...@@ -69,6 +70,8 @@ func newTestManager(t *testing.T) (*Manager, *testNetworkManager) { ...@@ -69,6 +70,8 @@ func newTestManager(t *testing.T) (*Manager, *testNetworkManager) {
t.Fatalf("Failed to initialize store %v", err) t.Fatalf("Failed to initialize store %v", err)
} }
rngGen := fastRNG.NewStreamGenerator(1000, 10, csprng.NewSystemRNG)
// Create our Manager object // Create our Manager object
m := &Manager{ m := &Manager{
e2e: mockE2e{grp: getGroup()}, e2e: mockE2e{grp: getGroup()},
...@@ -76,6 +79,7 @@ func newTestManager(t *testing.T) (*Manager, *testNetworkManager) { ...@@ -76,6 +79,7 @@ func newTestManager(t *testing.T) (*Manager, *testNetworkManager) {
user: mockUser{testing: t, key: key}, user: mockUser{testing: t, key: key},
store: udStore, store: udStore,
comms: &mockComms{}, comms: &mockComms{},
rng: rngGen,
kv: kv, kv: kv,
} }
tnm := newTestNetworkManager(t) tnm := newTestNetworkManager(t)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment