test: Update configs and revert changes during testing (#5393)

This commit is contained in:
Simon Frei
2018-12-21 11:50:28 +01:00
committed by Jakob Borg
parent 2626143fc5
commit c3b3e02f21
6 changed files with 38 additions and 9 deletions

View File

@@ -29,6 +29,8 @@ func TestSymlinks(t *testing.T) {
fld := cfg.Folders()["default"]
fld.Versioning = config.VersioningConfiguration{}
cfg.SetFolder(fld)
os.Rename("h2/config.xml", "h2/config.xml.orig")
defer os.Rename("h2/config.xml.orig", "h2/config.xml")
cfg.Save()
testSymlinks(t)
@@ -48,6 +50,8 @@ func TestSymlinksSimpleVersioning(t *testing.T) {
Params: map[string]string{"keep": "5"},
}
cfg.SetFolder(fld)
os.Rename("h2/config.xml", "h2/config.xml.orig")
defer os.Rename("h2/config.xml.orig", "h2/config.xml")
cfg.Save()
testSymlinks(t)
@@ -66,6 +70,8 @@ func TestSymlinksStaggeredVersioning(t *testing.T) {
Type: "staggered",
}
cfg.SetFolder(fld)
os.Rename("h2/config.xml", "h2/config.xml.orig")
defer os.Rename("h2/config.xml.orig", "h2/config.xml")
cfg.Save()
testSymlinks(t)