Merge pull request #2103 from Zillode/fix-integration-rename-windows

Fix integration rename windows
This commit is contained in:
Jakob Borg
2015-08-05 08:59:53 +02:00
3 changed files with 8 additions and 6 deletions

View File

@@ -38,7 +38,7 @@
<gui enabled="true" tls="false">
<address>127.0.0.1:8081</address>
<user>testuser</user>
<password>$2a$10$7tKL5uvLDGn5s2VLPM2yWOK/II45az0mTel8hxAUJDRQN1Tk2QYwu</password>
<password>$2a$10$7tKL5uvLDGn5s2VLPM2yWOK/II45az0mTel8hxAUJDRQN1Tk2QYwu</password><!-- password is testpass -->
<apikey>abc123</apikey>
</gui>
<options>

View File

@@ -15,6 +15,7 @@ import (
"github.com/syncthing/protocol"
"github.com/syncthing/syncthing/internal/config"
"github.com/syncthing/syncthing/internal/osutil"
"github.com/syncthing/syncthing/internal/rc"
)
@@ -50,7 +51,7 @@ func TestAddDeviceWithoutRestart(t *testing.T) {
os.Remove("h4/config.xml.orig")
os.Rename("h4/config.xml", "h4/config.xml.orig")
defer os.Rename("h4/config.xml.orig", "h4/config.xml")
defer osutil.Rename("h4/config.xml.orig", "h4/config.xml")
cfg, err := p4.GetConfig()
if err != nil {
@@ -117,7 +118,7 @@ func TestFolderWithoutRestart(t *testing.T) {
os.Remove("h1/config.xml.orig")
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, err := p1.GetConfig()
if err != nil {
@@ -154,7 +155,7 @@ func TestFolderWithoutRestart(t *testing.T) {
os.Remove("h4/config.xml.orig")
os.Rename("h4/config.xml", "h4/config.xml.orig")
defer os.Rename("h4/config.xml.orig", "h4/config.xml")
defer osutil.Rename("h4/config.xml.orig", "h4/config.xml")
cfg, err = p4.GetConfig()
if err != nil {

View File

@@ -18,6 +18,7 @@ import (
"github.com/syncthing/protocol"
"github.com/syncthing/syncthing/internal/config"
"github.com/syncthing/syncthing/internal/osutil"
"github.com/syncthing/syncthing/internal/rc"
)
@@ -29,7 +30,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 +159,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...")