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

Update tests in UD/

parent 124438ec
No related branches found
No related tags found
2 merge requests!510Release,!207WIP: Client Restructure
...@@ -83,7 +83,7 @@ func TestManager_Lookup(t *testing.T) { ...@@ -83,7 +83,7 @@ func TestManager_Lookup(t *testing.T) {
p := single.RequestParams{ p := single.RequestParams{
Timeout: timeout, Timeout: timeout,
MaxResponseMessages: 1, MaxResponseMessages: 1,
CmixParam: cmix.GetDefaultCMIXParams(), CmixParams: cmix.GetDefaultCMIXParams(),
} }
// Run the lookup // Run the lookup
......
...@@ -68,7 +68,7 @@ func TestManager_Search(t *testing.T) { ...@@ -68,7 +68,7 @@ func TestManager_Search(t *testing.T) {
p := single.RequestParams{ p := single.RequestParams{
Timeout: timeout, Timeout: timeout,
MaxResponseMessages: 1, MaxResponseMessages: 1,
CmixParam: cmix.GetDefaultCMIXParams(), CmixParams: cmix.GetDefaultCMIXParams(),
} }
_, _, err = Search(m.network, m.events, prng, m.e2e.GetGroup(), _, _, err = Search(m.network, m.events, prng, m.e2e.GetGroup(),
......
...@@ -78,7 +78,7 @@ func newTestManager(t *testing.T) (*Manager, *testNetworkManager) { ...@@ -78,7 +78,7 @@ func newTestManager(t *testing.T) (*Manager, *testNetworkManager) {
// Create our Manager object // Create our Manager object
m := &Manager{ m := &Manager{
e2e: mockE2e{}, e2e: mockE2e{grp: getGroup()},
events: event.NewEventManager(), events: event.NewEventManager(),
user: mockUser{testing: t, key: key}, user: mockUser{testing: t, key: key},
store: udStore, store: udStore,
...@@ -398,7 +398,13 @@ func (m mockComms) GetHost(hostId *id.ID) (*connect.Host, bool) { ...@@ -398,7 +398,13 @@ func (m mockComms) GetHost(hostId *id.ID) (*connect.Host, bool) {
return m.udHost, true return m.udHost, true
} }
type mockE2e struct{} type mockE2e struct {
grp *cyclic.Group
}
func (m mockE2e) GetHistoricalDHPubkey() *cyclic.Int {
return m.grp.NewInt(6)
}
func (m mockE2e) GetReceptionID() *id.ID { func (m mockE2e) GetReceptionID() *id.ID {
//TODO implement me //TODO implement me
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment