Properly rename config files during integration tests (fixes #1769)

This commit is contained in:
Lode Hoste
2015-07-30 18:03:00 +02:00
parent b1dd704819
commit 2baf61fda3
2 changed files with 5 additions and 5 deletions

View File

@@ -29,7 +29,7 @@ func TestOverride(t *testing.T) {
fld.ReadOnly = true
cfg.SetFolder(fld)
os.Rename("h1/config.xml", "h1/config.xml.orig")
defer os.Rename("h1/config.xml.orig", "h1/config.xml")
defer osutil.Rename("h1/config.xml.orig", "h1/config.xml")
cfg.Save()
log.Println("Cleaning...")
@@ -158,7 +158,7 @@ func TestOverrideIgnores(t *testing.T) {
fld.ReadOnly = true
cfg.SetFolder(fld)
os.Rename("h1/config.xml", "h1/config.xml.orig")
defer os.Rename("h1/config.xml.orig", "h1/config.xml")
defer osutil.Rename("h1/config.xml.orig", "h1/config.xml")
cfg.Save()
log.Println("Cleaning...")