MCPcopy
hub / github.com/syncthing/syncthing / TestFileTypeChange

Function TestFileTypeChange

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

Source from the content-addressed store, hash-verified

21)
22
23func TestFileTypeChange(t *testing.T) {
24 // Use no versioning
25 id, _ := protocol.DeviceIDFromString(id2)
26 cfg, _, _ := config.Load("h2/config.xml", id, events.NoopLogger)
27 fld := cfg.Folders()["default"]
28 fld.Versioning = config.VersioningConfiguration{}
29 cfg.SetFolder(fld)
30 os.Rename("h2/config.xml", "h2/config.xml.orig")
31 defer os.Rename("h2/config.xml.orig", "h2/config.xml")
32 cfg.Save()
33
34 testFileTypeChange(t)
35}
36
37func TestFileTypeChangeSimpleVersioning(t *testing.T) {
38 // Use simple 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