lib/model: Small fixes to test convenience functions (#5128)
This commit is contained in:
@@ -54,11 +54,11 @@ func expectTimeout(w *events.Subscription, t *testing.T) {
|
||||
func TestProgressEmitter(t *testing.T) {
|
||||
w := events.Default.Subscribe(events.DownloadProgress)
|
||||
|
||||
c, path := createTmpWrapper(config.Configuration{})
|
||||
c := createTmpWrapper(config.Configuration{})
|
||||
defer os.Remove(c.ConfigPath())
|
||||
c.SetOptions(config.OptionsConfiguration{
|
||||
ProgressUpdateIntervalS: 0,
|
||||
})
|
||||
defer os.Remove(path)
|
||||
|
||||
p := NewProgressEmitter(c)
|
||||
go p.Serve()
|
||||
@@ -103,12 +103,12 @@ func TestProgressEmitter(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSendDownloadProgressMessages(t *testing.T) {
|
||||
c, path := createTmpWrapper(config.Configuration{})
|
||||
c := createTmpWrapper(config.Configuration{})
|
||||
defer os.Remove(c.ConfigPath())
|
||||
c.SetOptions(config.OptionsConfiguration{
|
||||
ProgressUpdateIntervalS: 0,
|
||||
TempIndexMinBlocks: 10,
|
||||
})
|
||||
defer os.Remove(path)
|
||||
|
||||
fc := &fakeConnection{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user