summaryrefslogtreecommitdiffstats
path: root/integration
diff options
context:
space:
mode:
authorJakob Borg <jakob@nym.se>2014-03-28 14:36:57 +0100
committerJakob Borg <jakob@nym.se>2014-03-29 13:47:21 +0100
commitf87b1520e892c22da184f16e16fa95684b711e8d (patch)
tree93b179582683d852f0781cd192e9f7ce8f543070 /integration
parent3700eb1e61166eb9f95d1a2a6c7d606be5cbb614 (diff)
The Great Rewrite (fixes #36, #61, #94, #101)
Rewrite of the file model and pulling mechanism. Needs lots of cleanup and bugfixes, now...
Diffstat (limited to 'integration')
-rw-r--r--integration/genfiles.go6
-rw-r--r--integration/h1/config.xml6
-rw-r--r--integration/h2/config.xml6
-rw-r--r--integration/h3/config.xml6
-rwxr-xr-xintegration/test.sh8
5 files changed, 12 insertions, 20 deletions
diff --git a/integration/genfiles.go b/integration/genfiles.go
index 98b824f3ae..c66b800e87 100644
--- a/integration/genfiles.go
+++ b/integration/genfiles.go
@@ -7,7 +7,7 @@ import (
"io/ioutil"
mr "math/rand"
"os"
- "path"
+ "path/filepath"
"time"
)
@@ -27,7 +27,7 @@ func main() {
for i := 0; i < files; i++ {
n := name()
- p0 := path.Join(string(n[0]), n[0:2])
+ p0 := filepath.Join(string(n[0]), n[0:2])
os.MkdirAll(p0, 0755)
s := 1 << uint(mr.Intn(maxexp))
a := 128 * 1024
@@ -37,7 +37,7 @@ func main() {
s += mr.Intn(a)
b := make([]byte, s)
rand.Reader.Read(b)
- p1 := path.Join(p0, n)
+ p1 := filepath.Join(p0, n)
ioutil.WriteFile(p1, b, 0644)
os.Chmod(p1, os.FileMode(mr.Intn(0777)|0400))
diff --git a/integration/h1/config.xml b/integration/h1/config.xml
index f5840342fb..4e313de87b 100644
--- a/integration/h1/config.xml
+++ b/integration/h1/config.xml
@@ -1,13 +1,13 @@
<configuration version="1">
<repository directory="s1">
<node id="I6KAH7666SLLL5PFXSOAUFJCDZYAOMLEKCP2GB3BV5RQST3PSROA" name="s1">
- <address>dynamic</address>
+ <address>127.0.0.1:22001</address>
</node>
<node id="JMFJCXBGZDE4BOCJE3VF65GYZNAIVJRET3J6HMRAUQIGJOFKNHMQ" name="s2">
- <address>dynamic</address>
+ <address>127.0.0.1:22002</address>
</node>
<node id="373HSRPQLPNLIJYKZVQFP4PKZ6R2ZE6K3YD442UJHBGBQGWWXAHA" name="s3">
- <address>dynamic</address>
+ <address>127.0.0.1:22003</address>
</node>
</repository>
<options>
diff --git a/integration/h2/config.xml b/integration/h2/config.xml
index c18c147ec3..65ccf4e4cf 100644
--- a/integration/h2/config.xml
+++ b/integration/h2/config.xml
@@ -1,13 +1,13 @@
<configuration version="1">
<repository directory="s2">
<node id="I6KAH7666SLLL5PFXSOAUFJCDZYAOMLEKCP2GB3BV5RQST3PSROA" name="s1">
- <address>dynamic</address>
+ <address>127.0.0.1:22001</address>
</node>
<node id="JMFJCXBGZDE4BOCJE3VF65GYZNAIVJRET3J6HMRAUQIGJOFKNHMQ" name="s2">
- <address>dynamic</address>
+ <address>127.0.0.1:22002</address>
</node>
<node id="373HSRPQLPNLIJYKZVQFP4PKZ6R2ZE6K3YD442UJHBGBQGWWXAHA" name="s3">
- <address>dynamic</address>
+ <address>127.0.0.1:22003</address>
</node>
</repository>
<options>
diff --git a/integration/h3/config.xml b/integration/h3/config.xml
index f990deeba3..bdd23c5faf 100644
--- a/integration/h3/config.xml
+++ b/integration/h3/config.xml
@@ -1,13 +1,13 @@
<configuration version="1">
<repository directory="s3">
<node id="I6KAH7666SLLL5PFXSOAUFJCDZYAOMLEKCP2GB3BV5RQST3PSROA" name="s1">
- <address>dynamic</address>
+ <address>127.0.0.1:22001</address>
</node>
<node id="JMFJCXBGZDE4BOCJE3VF65GYZNAIVJRET3J6HMRAUQIGJOFKNHMQ" name="s2">
- <address>dynamic</address>
+ <address>127.0.0.1:22002</address>
</node>
<node id="373HSRPQLPNLIJYKZVQFP4PKZ6R2ZE6K3YD442UJHBGBQGWWXAHA" name="s3">
- <address>dynamic</address>
+ <address>127.0.0.1:22003</address>
</node>
</repository>
<options>
diff --git a/integration/test.sh b/integration/test.sh
index 1552f70215..839468082e 100755
--- a/integration/test.sh
+++ b/integration/test.sh
@@ -68,25 +68,17 @@ for i in 1 2 3 ; do
../genfiles -maxexp 22 -files 600
echo " $i: empty file"
touch "empty-$i"
- echo " $i: common file"
- dd if=/dev/urandom of=common bs=1000 count=1000 2>/dev/null
echo " $i: large file"
dd if=/dev/urandom of=large-$i bs=1024k count=55 2>/dev/null
popd >/dev/null
done
-# instance 1 common file should be the newest, the other should disappear
-sleep 2
-touch "s1/common"
-
echo "MD5-summing..."
for i in 1 2 3 ; do
pushd "s$i" >/dev/null
../md5r -l > ../md5-$i
popd >/dev/null
done
-grep -v common md5-2 > t ; mv t md5-2
-grep -v common md5-3 > t ; mv t md5-3
testConvergence