MCPcopy
hub / github.com/syncthing/syncthing / TestFileTypeChangeSimpleVersioning

Function TestFileTypeChangeSimpleVersioning

test/filetype_test.go:37–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestFileTypeChangeSimpleVersioning(t *testing.T) {
38 // Use simple versioning
39 id, _ := protocol.DeviceIDFromString(id2)
40 cfg, _, _ := config.Load("h2/config.xml", id, events.NoopLogger)
41 fld := cfg.Folders()["default"]
42 fld.Versioning = config.VersioningConfiguration{
43 Type: "simple",
44 Params: map[string]string{"keep": "5"},
45 }
46 cfg.SetFolder(fld)
47 os.Rename("h2/config.xml", "h2/config.xml.orig")
48 defer os.Rename("h2/config.xml.orig", "h2/config.xml")
49 cfg.Save()
50
51 testFileTypeChange(t)
52}
53
54func TestFileTypeChangeStaggeredVersioning(t *testing.T) {
55 // Use staggered versioning

Callers

nothing calls this directly

Calls 7

DeviceIDFromStringFunction · 0.92
LoadFunction · 0.92
testFileTypeChangeFunction · 0.85
SetFolderMethod · 0.80
FoldersMethod · 0.65
RenameMethod · 0.65
SaveMethod · 0.65

Tested by

no test coverage detected