lib/config, lib/model: Configurable folder marker name (fixes #1126)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4483
This commit is contained in:
Jakob Borg
2017-11-05 12:18:05 +00:00
committed by Audrius Butkevicius
parent 166273b357
commit 9c855ab22e
6 changed files with 111 additions and 21 deletions

View File

@@ -85,13 +85,13 @@ func TestDefaultValues(t *testing.T) {
func TestDeviceConfig(t *testing.T) {
for i := OldestHandledVersion; i <= CurrentVersion; i++ {
os.RemoveAll("testdata/.stfolder")
os.RemoveAll(filepath.Join("testdata", DefaultMarkerName))
wr, err := Load(fmt.Sprintf("testdata/v%d.xml", i), device1)
if err != nil {
t.Fatal(err)
}
_, err = os.Stat("testdata/.stfolder")
_, err = os.Stat(filepath.Join("testdata", DefaultMarkerName))
if i < 6 && err != nil {
t.Fatal(err)
} else if i >= 6 && err == nil {
@@ -120,6 +120,7 @@ func TestDeviceConfig(t *testing.T) {
Params: map[string]string{},
},
WeakHashThresholdPct: 25,
MarkerName: DefaultMarkerName,
},
}