diff options
author | Simon Frei <freisim93@gmail.com> | 2018-12-21 11:50:28 +0100 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2018-12-21 11:50:28 +0100 |
commit | c3b3e02f21bee4bfa1809f6ac226ebc6f5a22e90 (patch) | |
tree | f5409354327e29c6fae621127d8ff7e398b960d9 /test | |
parent | 2626143fc5ea9028e4f783f23258dcc2ddfeeeed (diff) | |
download | syncthing-c3b3e02f21bee4bfa1809f6ac226ebc6f5a22e90.tar.gz syncthing-c3b3e02f21bee4bfa1809f6ac226ebc6f5a22e90.zip |
test: Update configs and revert changes during testing (#5393)
Diffstat (limited to 'test')
-rw-r--r-- | test/filetype_test.go | 6 | ||||
-rw-r--r-- | test/h1/config.xml | 11 | ||||
-rw-r--r-- | test/h2/config.xml | 11 | ||||
-rw-r--r-- | test/h3/config.xml | 9 | ||||
-rw-r--r-- | test/override_test.go | 4 | ||||
-rw-r--r-- | test/symlink_test.go | 6 |
6 files changed, 38 insertions, 9 deletions
diff --git a/test/filetype_test.go b/test/filetype_test.go index fe6988332..922892716 100644 --- a/test/filetype_test.go +++ b/test/filetype_test.go @@ -25,6 +25,8 @@ func TestFileTypeChange(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() testFileTypeChange(t) @@ -40,6 +42,8 @@ func TestFileTypeChangeSimpleVersioning(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() testFileTypeChange(t) @@ -54,6 +58,8 @@ func TestFileTypeChangeStaggeredVersioning(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() testFileTypeChange(t) diff --git a/test/h1/config.xml b/test/h1/config.xml index 606b069d5..5bd47cc87 100644 --- a/test/h1/config.xml +++ b/test/h1/config.xml @@ -1,5 +1,5 @@ <configuration version="28"> - <folder id="default" label="" path="s1/" type="readwrite" rescanIntervalS="10" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> + <folder id="default" label="" path="s1/" type="sendreceive" rescanIntervalS="10" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> <filesystemType>basic</filesystemType> <device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" introducedBy=""></device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> @@ -22,7 +22,7 @@ <markerName>.stfolder</markerName> <useLargeBlocks>true</useLargeBlocks> </folder> - <folder id="¯\_(ツ)_/¯ Räksmörgås 动作 Адрес" label="" path="s12-1/" type="readwrite" rescanIntervalS="10" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> + <folder id="¯\_(ツ)_/¯ Räksmörgås 动作 Адрес" label="" path="s12-1/" type="sendreceive" rescanIntervalS="10" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> <filesystemType>basic</filesystemType> <device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" introducedBy=""></device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> @@ -49,6 +49,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" name="s1" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22001</address> @@ -56,6 +57,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" name="s2" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22002</address> @@ -63,6 +65,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="373HSRP-QLPNLIE-JYKZVQF-P4PKZ63-R2ZE6K3-YD442U2-JHBGBQG-WWXAHAU" name="s3" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22003</address> @@ -70,6 +73,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="7PBCTLL-JJRYBSA-MOWZRKL-MSDMN4N-4US4OMX-SYEXUS4-HSBGNRY-CZXRXAT" name="s4" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22004</address> @@ -77,6 +81,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <gui enabled="true" tls="false" debugging="true"> <address>127.0.0.1:8081</address> @@ -85,6 +90,7 @@ <apikey>abc123</apikey> <theme>default</theme> </gui> + <ldap></ldap> <options> <listenAddress>tcp://127.0.0.1:22001</listenAddress> <globalAnnounceServer>default</globalAnnounceServer> @@ -122,6 +128,7 @@ <trafficClass>0</trafficClass> <defaultFolderPath>~</defaultFolderPath> <setLowPriority>true</setLowPriority> + <maxConcurrentScans>0</maxConcurrentScans> <minHomeDiskFreePct>0</minHomeDiskFreePct> </options> </configuration> diff --git a/test/h2/config.xml b/test/h2/config.xml index 9c6dd4feb..ac49499fd 100644 --- a/test/h2/config.xml +++ b/test/h2/config.xml @@ -1,5 +1,5 @@ <configuration version="28"> - <folder id="default" label="" path="s2" type="readwrite" rescanIntervalS="15" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> + <folder id="default" label="" path="s2" type="sendreceive" rescanIntervalS="15" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> <filesystemType>basic</filesystemType> <device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" introducedBy=""></device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> @@ -21,7 +21,7 @@ <markerName>.stfolder</markerName> <useLargeBlocks>true</useLargeBlocks> </folder> - <folder id="s23" label="" path="s23-2" type="readwrite" rescanIntervalS="15" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> + <folder id="s23" label="" path="s23-2" type="sendreceive" rescanIntervalS="15" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> <filesystemType>basic</filesystemType> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> <device id="373HSRP-QLPNLIE-JYKZVQF-P4PKZ63-R2ZE6K3-YD442U2-JHBGBQG-WWXAHAU" introducedBy=""></device> @@ -42,7 +42,7 @@ <markerName>.stfolder</markerName> <useLargeBlocks>true</useLargeBlocks> </folder> - <folder id="¯\_(ツ)_/¯ Räksmörgås 动作 Адрес" label="" path="s12-2" type="readwrite" rescanIntervalS="15" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> + <folder id="¯\_(ツ)_/¯ Räksmörgås 动作 Адрес" label="" path="s12-2" type="sendreceive" rescanIntervalS="15" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> <filesystemType>basic</filesystemType> <device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" introducedBy=""></device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> @@ -69,6 +69,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" name="s2" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22002</address> @@ -76,6 +77,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="373HSRP-QLPNLIE-JYKZVQF-P4PKZ63-R2ZE6K3-YD442U2-JHBGBQG-WWXAHAU" name="s3" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22003</address> @@ -83,12 +85,14 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <gui enabled="true" tls="false" debugging="true"> <address>127.0.0.1:8082</address> <apikey>abc123</apikey> <theme>default</theme> </gui> + <ldap></ldap> <options> <listenAddress>dynamic+https://relays.syncthing.net/endpoint</listenAddress> <listenAddress>tcp://127.0.0.1:22002</listenAddress> @@ -127,6 +131,7 @@ <trafficClass>0</trafficClass> <defaultFolderPath>~</defaultFolderPath> <setLowPriority>true</setLowPriority> + <maxConcurrentScans>0</maxConcurrentScans> <minHomeDiskFreePct>0</minHomeDiskFreePct> </options> </configuration> diff --git a/test/h3/config.xml b/test/h3/config.xml index 7cad3d398..e29e22e85 100644 --- a/test/h3/config.xml +++ b/test/h3/config.xml @@ -1,5 +1,5 @@ <configuration version="28"> - <folder id="default" label="" path="s3" type="readwrite" rescanIntervalS="20" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> + <folder id="default" label="" path="s3" type="sendreceive" rescanIntervalS="20" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> <filesystemType>basic</filesystemType> <device id="I6KAH76-66SLLLB-5PFXSOA-UFJCDZC-YAOMLEK-CP2GB32-BV5RQST-3PSROAU" introducedBy=""></device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> @@ -23,7 +23,7 @@ <markerName>.stfolder</markerName> <useLargeBlocks>true</useLargeBlocks> </folder> - <folder id="s23" label="" path="s23-3" type="readwrite" rescanIntervalS="20" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> + <folder id="s23" label="" path="s23-3" type="sendreceive" rescanIntervalS="20" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true"> <filesystemType>basic</filesystemType> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" introducedBy=""></device> <device id="373HSRP-QLPNLIE-JYKZVQF-P4PKZ63-R2ZE6K3-YD442U2-JHBGBQG-WWXAHAU" introducedBy=""></device> @@ -50,6 +50,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="MRIW7OK-NETT3M4-N6SBWME-N25O76W-YJKVXPH-FUMQJ3S-P57B74J-GBITBAC" name="s2" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22002</address> @@ -57,6 +58,7 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <device id="373HSRP-QLPNLIE-JYKZVQF-P4PKZ63-R2ZE6K3-YD442U2-JHBGBQG-WWXAHAU" name="s3" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy=""> <address>tcp://127.0.0.1:22003</address> @@ -64,12 +66,14 @@ <autoAcceptFolders>false</autoAcceptFolders> <maxSendKbps>0</maxSendKbps> <maxRecvKbps>0</maxRecvKbps> + <maxRequestKiB>0</maxRequestKiB> </device> <gui enabled="true" tls="false" debugging="true"> <address>127.0.0.1:8083</address> <apikey>abc123</apikey> <theme>default</theme> </gui> + <ldap></ldap> <options> <listenAddress>dynamic+https://relays.syncthing.net/endpoint</listenAddress> <listenAddress>tcp://127.0.0.1:22003</listenAddress> @@ -108,6 +112,7 @@ <trafficClass>0</trafficClass> <defaultFolderPath>~</defaultFolderPath> <setLowPriority>true</setLowPriority> + <maxConcurrentScans>0</maxConcurrentScans> <minHomeDiskFreePct>0</minHomeDiskFreePct> </options> </configuration> diff --git a/test/override_test.go b/test/override_test.go index 01ea3c3a9..fe764176e 100644 --- a/test/override_test.go +++ b/test/override_test.go @@ -28,8 +28,8 @@ func TestOverride(t *testing.T) { fld := cfg.Folders()["default"] fld.Type = config.FolderTypeSendOnly cfg.SetFolder(fld) - os.Rename("h1/config.xml", "h1/config.xml.orig") - defer os.Rename("h1/config.xml.orig", "h1/config.xml") + t.Log(os.Rename("h1/config.xml", "h1/config.xml.orig")) + defer t.Log(os.Rename("h1/config.xml.orig", "h1/config.xml")) cfg.Save() log.Println("Cleaning...") diff --git a/test/symlink_test.go b/test/symlink_test.go index 8dab012f4..282db30f7 100644 --- a/test/symlink_test.go +++ b/test/symlink_test.go @@ -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) |