Browse Source

Test case for #342

Jakob Borg 11 years ago
parent
commit
6d24e4f122
4 changed files with 11 additions and 3 deletions
  1. 2 0
      integration/.gitignore
  2. 0 1
      integration/h1/config.xml
  3. 3 0
      integration/h4/config.xml
  4. 6 2
      integration/test.sh

+ 2 - 0
integration/.gitignore

@@ -12,3 +12,5 @@ json
 *.idx.gz
 dirs-*
 *.out
+csrftokens.txt
+s4d

+ 0 - 1
integration/h1/config.xml

@@ -1,7 +1,6 @@
 <configuration version="2">
     <repository id="default" directory="s1" ro="false" ignorePerms="false">
         <node id="373HSRPQLPNLIJYKZVQFP4PKZ6R2ZE6K3YD442UJHBGBQGWWXAHA"></node>
-        <node id="EJHMPAQOGCVORISB4IS3SYYVJXTKJGLTU66DIQPGJ5D2GXGQ3OWQ"></node>
         <node id="I6KAH7666SLLL5PFXSOAUFJCDZYAOMLEKCP2GB3BV5RQST3PSROA"></node>
         <node id="JMFJCXBGZDE4BOCJE3VF65GYZNAIVJRET3J6HMRAUQIGJOFKNHMQ"></node>
         <versioning></versioning>

+ 3 - 0
integration/h4/config.xml

@@ -5,6 +5,9 @@
         <node id="373HSRPQLPNLIJYKZVQFP4PKZ6R2ZE6K3YD442UJHBGBQGWWXAHA" name="s3"></node>
         <node id="EJHMPAQOGCVORISB4IS3SYYVJXTKJGLTU66DIQPGJ5D2GXGQ3OWQ" name="s4"></node>
     </repository>
+    <repository id="default" directory="s4d" ro="false">
+        <node id="I6KAH7666SLLL5PFXSOAUFJCDZYAOMLEKCP2GB3BV5RQST3PSROA" name="s1"></node>
+    </repository>
     <node id="I6KAH7666SLLL5PFXSOAUFJCDZYAOMLEKCP2GB3BV5RQST3PSROA" name="s1">
         <address>127.0.0.1:22001</address>
     </node>

+ 6 - 2
integration/test.sh

@@ -105,10 +105,11 @@ alterFiles() {
 	pkill -CONT syncthing
 }
 
+rm -f h?/*.idx.gz
+rm -rf s? s??-? s4d
+
 echo "Setting up files..."
 for i in 1 2 3 12-1 12-2 23-2 23-3; do
-	rm -f h$i/*.idx.gz
-	rm -rf "s$i"
 	mkdir "s$i"
 	pushd "s$i" >/dev/null
 	echo "  $i: random nonoverlapping"
@@ -125,6 +126,9 @@ for i in 1 2 3 12-1 12-2 23-2 23-3; do
 	popd >/dev/null
 done
 
+mkdir s4d
+echo somerandomdata > s4d/extrafile
+
 echo "MD5-summing..."
 for i in 1 2 3 12-1 12-2 23-2 23-3 ; do
 	pushd "s$i" >/dev/null