Skip to content
Snippets Groups Projects
Commit e9213705 authored by Jono Wenger's avatar Jono Wenger
Browse files

Fix file transfer test utils

parent 522c365c
No related branches found
No related tags found
3 merge requests!510Release,!419rewrote the health tracker to both consider if there are waiting rounds and...,!340Project/channels
......@@ -119,11 +119,6 @@ func (m *mockCmix) Send(*id.ID, format.Fingerprint, message.Service, []byte,
panic("implement me")
}
func (m *mockCmix) SendWithAssembler(recipient *id.ID, assembler cmix.MessageAssembler,
cmixParams cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
_ cmix.CMIXParams) (rounds.Round, []ephemeral.Id, error) {
m.handler.Lock()
......@@ -140,6 +135,11 @@ func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
return rounds.Round{ID: 42}, []ephemeral.Id{}, nil
}
func (m *mockCmix) SendWithAssembler(*id.ID, cmix.MessageAssembler,
cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) AddIdentity(*id.ID, time.Time, bool) { panic("implement me") }
func (m *mockCmix) RemoveIdentity(*id.ID) { panic("implement me") }
func (m *mockCmix) GetIdentity(*id.ID) (identity.TrackedID, error) { panic("implement me") }
......@@ -196,10 +196,12 @@ func (m *mockCmix) GetRoundResults(_ time.Duration,
func (m *mockCmix) LookupHistoricalRound(id.Round, rounds.RoundResultCallback) error {
panic("implement me")
}
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error), *stoppable.Single) (interface{}, error) {
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error),
*stoppable.Single) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc, *stoppable.Single, time.Duration) (interface{}, error) {
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc,
*stoppable.Single, time.Duration) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SetGatewayFilter(gateway.Filter) { panic("implement me") }
......
......@@ -121,11 +121,6 @@ func (m *mockCmix) Send(*id.ID, format.Fingerprint, message.Service, []byte,
panic("implement me")
}
func (m *mockCmix) SendWithAssembler(recipient *id.ID, assembler cmix.MessageAssembler,
cmixParams cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
_ cmix.CMIXParams) (rounds.Round, []ephemeral.Id, error) {
m.handler.Lock()
......@@ -142,6 +137,11 @@ func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
return rounds.Round{ID: 42}, []ephemeral.Id{}, nil
}
func (m *mockCmix) SendWithAssembler(*id.ID, cmix.MessageAssembler,
cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) AddIdentity(*id.ID, time.Time, bool) { panic("implement me") }
func (m *mockCmix) RemoveIdentity(*id.ID) { panic("implement me") }
func (m *mockCmix) GetIdentity(*id.ID) (identity.TrackedID, error) { panic("implement me") }
......@@ -198,10 +198,12 @@ func (m *mockCmix) GetRoundResults(_ time.Duration,
func (m *mockCmix) LookupHistoricalRound(id.Round, rounds.RoundResultCallback) error {
panic("implement me")
}
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error), *stoppable.Single) (interface{}, error) {
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error),
*stoppable.Single) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc, *stoppable.Single, time.Duration) (interface{}, error) {
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc,
*stoppable.Single, time.Duration) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SetGatewayFilter(gateway.Filter) { panic("implement me") }
......
......@@ -116,11 +116,6 @@ func (m *mockCmix) Send(*id.ID, format.Fingerprint, message.Service, []byte,
panic("implement me")
}
func (m *mockCmix) SendWithAssembler(recipient *id.ID, assembler cmix.MessageAssembler,
cmixParams cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
_ cmix.CMIXParams) (rounds.Round, []ephemeral.Id, error) {
m.handler.Lock()
......@@ -137,6 +132,11 @@ func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
return rounds.Round{ID: 42}, []ephemeral.Id{}, nil
}
func (m *mockCmix) SendWithAssembler(*id.ID, cmix.MessageAssembler,
cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) AddIdentity(*id.ID, time.Time, bool) { panic("implement me") }
func (m *mockCmix) RemoveIdentity(*id.ID) { panic("implement me") }
func (m *mockCmix) GetIdentity(*id.ID) (identity.TrackedID, error) { panic("implement me") }
......@@ -193,10 +193,12 @@ func (m *mockCmix) GetRoundResults(_ time.Duration,
func (m *mockCmix) LookupHistoricalRound(id.Round, rounds.RoundResultCallback) error {
panic("implement me")
}
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error), *stoppable.Single) (interface{}, error) {
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error),
*stoppable.Single) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc, *stoppable.Single, time.Duration) (interface{}, error) {
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc,
*stoppable.Single, time.Duration) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SetGatewayFilter(gateway.Filter) { panic("implement me") }
......
......@@ -141,7 +141,8 @@ func (m *manager) sendCmix(packet []store.Part) {
// roundResultsCallback generates a network.RoundEventCallback that handles
// all parts in the packet once the round succeeds or fails.
func (m *manager) roundResultsCallback(packet []store.Part) cmix.RoundEventCallback {
func (m *manager) roundResultsCallback(
packet []store.Part) cmix.RoundEventCallback {
// Group file parts by transfer
grouped := map[ftCrypto.TransferID][]store.Part{}
for _, p := range packet {
......
......@@ -170,11 +170,6 @@ func (m *mockCmix) Send(*id.ID, format.Fingerprint, message.Service, []byte,
panic("implement me")
}
func (m *mockCmix) SendWithAssembler(recipient *id.ID, assembler cmix.MessageAssembler,
cmixParams cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
_ cmix.CMIXParams) (rounds.Round, []ephemeral.Id, error) {
m.handler.Lock()
......@@ -193,6 +188,11 @@ func (m *mockCmix) SendMany(messages []cmix.TargetedCmixMessage,
return rounds.Round{ID: round}, []ephemeral.Id{}, nil
}
func (m *mockCmix) SendWithAssembler(*id.ID, cmix.MessageAssembler,
cmix.CMIXParams) (rounds.Round, ephemeral.Id, error) {
panic("implement me")
}
func (m *mockCmix) AddIdentity(*id.ID, time.Time, bool) { panic("implement me") }
func (m *mockCmix) RemoveIdentity(*id.ID) { panic("implement me") }
func (m *mockCmix) GetIdentity(*id.ID) (identity.TrackedID, error) { panic("implement me") }
......@@ -249,10 +249,12 @@ func (m *mockCmix) GetRoundResults(_ time.Duration,
func (m *mockCmix) LookupHistoricalRound(id.Round, rounds.RoundResultCallback) error {
panic("implement me")
}
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error), *stoppable.Single) (interface{}, error) {
func (m *mockCmix) SendToAny(func(host *connect.Host) (interface{}, error),
*stoppable.Single) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc, *stoppable.Single, time.Duration) (interface{}, error) {
func (m *mockCmix) SendToPreferred([]*id.ID, gateway.SendToPreferredFunc,
*stoppable.Single, time.Duration) (interface{}, error) {
panic("implement me")
}
func (m *mockCmix) SetGatewayFilter(gateway.Filter) { panic("implement me") }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment