mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Repair test suite
This commit is contained in:
parent
68afc897d6
commit
e22ddae3a8
@ -5,11 +5,11 @@ import (
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/calmh/syncthing/mc"
|
||||
"github.com/calmh/syncthing/beacon"
|
||||
)
|
||||
|
||||
func main() {
|
||||
b, err := mc.NewBeacon(21025)
|
||||
b, err := beacon.NewBeacon(21025)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ func TestDefaultValues(t *testing.T) {
|
||||
MaxSendKbps: 0,
|
||||
RescanIntervalS: 60,
|
||||
ReconnectIntervalS: 60,
|
||||
MaxChangeKbps: 1000,
|
||||
MaxChangeKbps: 10000,
|
||||
StartBrowser: true,
|
||||
UPnPEnabled: true,
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/calmh/syncthing/cid"
|
||||
"github.com/calmh/syncthing/config"
|
||||
"github.com/calmh/syncthing/protocol"
|
||||
"github.com/calmh/syncthing/scanner"
|
||||
)
|
||||
@ -47,7 +48,7 @@ func init() {
|
||||
}
|
||||
|
||||
func TestRequest(t *testing.T) {
|
||||
m := NewModel(1e6)
|
||||
m := NewModel("/tmp", &config.Configuration{}, "syncthing", "dev")
|
||||
m.AddRepo("default", "testdata", nil)
|
||||
m.ScanRepo("default")
|
||||
|
||||
@ -83,7 +84,7 @@ func genFiles(n int) []protocol.FileInfo {
|
||||
}
|
||||
|
||||
func BenchmarkIndex10000(b *testing.B) {
|
||||
m := NewModel(1e6)
|
||||
m := NewModel("/tmp", nil, "syncthing", "dev")
|
||||
m.AddRepo("default", "testdata", nil)
|
||||
m.ScanRepo("default")
|
||||
files := genFiles(10000)
|
||||
@ -95,7 +96,7 @@ func BenchmarkIndex10000(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkIndex00100(b *testing.B) {
|
||||
m := NewModel(1e6)
|
||||
m := NewModel("/tmp", nil, "syncthing", "dev")
|
||||
m.AddRepo("default", "testdata", nil)
|
||||
m.ScanRepo("default")
|
||||
files := genFiles(100)
|
||||
@ -107,7 +108,7 @@ func BenchmarkIndex00100(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkIndexUpdate10000f10000(b *testing.B) {
|
||||
m := NewModel(1e6)
|
||||
m := NewModel("/tmp", nil, "syncthing", "dev")
|
||||
m.AddRepo("default", "testdata", nil)
|
||||
m.ScanRepo("default")
|
||||
files := genFiles(10000)
|
||||
@ -120,7 +121,7 @@ func BenchmarkIndexUpdate10000f10000(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkIndexUpdate10000f00100(b *testing.B) {
|
||||
m := NewModel(1e6)
|
||||
m := NewModel("/tmp", nil, "syncthing", "dev")
|
||||
m.AddRepo("default", "testdata", nil)
|
||||
m.ScanRepo("default")
|
||||
files := genFiles(10000)
|
||||
@ -134,7 +135,7 @@ func BenchmarkIndexUpdate10000f00100(b *testing.B) {
|
||||
}
|
||||
|
||||
func BenchmarkIndexUpdate10000f00001(b *testing.B) {
|
||||
m := NewModel(1e6)
|
||||
m := NewModel("/tmp", nil, "syncthing", "dev")
|
||||
m.AddRepo("default", "testdata", nil)
|
||||
m.ScanRepo("default")
|
||||
files := genFiles(10000)
|
||||
@ -181,7 +182,7 @@ func (FakeConnection) Statistics() protocol.Statistics {
|
||||
}
|
||||
|
||||
func BenchmarkRequest(b *testing.B) {
|
||||
m := NewModel(1e6)
|
||||
m := NewModel("/tmp", nil, "syncthing", "dev")
|
||||
m.AddRepo("default", "testdata", nil)
|
||||
m.ScanRepo("default")
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package main
|
||||
package model
|
||||
|
||||
import (
|
||||
"testing"
|
Loading…
Reference in New Issue
Block a user