projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
796c14b
)
Also test whether tinc daemons can connect to each other after import/export.
author
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 1 Sep 2013 22:15:18 +0000
(
00:15
+0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Sun, 1 Sep 2013 22:15:18 +0000
(
00:15
+0200)
test/import-export.test
patch
|
blob
|
history
diff --git
a/test/import-export.test
b/test/import-export.test
index
a65f0f8
..
6b5641c
100755
(executable)
--- a/
test/import-export.test
+++ b/
test/import-export.test
@@
-6,17
+6,21
@@
$tinc $c1 <<EOF
init foo
$tinc $c1 <<EOF
init foo
-add Subnet 10.0.0.1
+set DeviceType dummy
+set Port 32752
+set Address localhost
EOF
$tinc $c2 <<EOF
init bar
EOF
$tinc $c2 <<EOF
init bar
-add Subnet 10.0.0.2
+set DeviceType dummy
+set Port 0
EOF
$tinc $c3 <<EOF
init baz
EOF
$tinc $c3 <<EOF
init baz
-add Subnet 10.0.0.3
+set DeviceType dummy
+set Port 0
EOF
# Test import, export and exchange commands
EOF
# Test import, export and exchange commands
@@
-36,3
+40,25
@@
cmp $d1/hosts/bar $d2/hosts/bar
cmp $d1/hosts/bar $d3/hosts/bar
cmp $d1/hosts/baz $d2/hosts/baz
cmp $d1/hosts/baz $d3/hosts/baz
cmp $d1/hosts/bar $d3/hosts/bar
cmp $d1/hosts/baz $d2/hosts/baz
cmp $d1/hosts/baz $d3/hosts/baz
+
+# Check whether the nodes can connect to each other
+
+$tinc $c1 start $r1
+
+$tinc $c2 add ConnectTo foo
+$tinc $c3 add ConnectTo foo
+
+sleep 1
+
+$tinc $c2 start $r2
+$tinc $c3 start $r3
+
+sleep 1
+
+test `$tinc $c1 dump reachable nodes | wc -l` = 3
+test `$tinc $c2 dump reachable nodes | wc -l` = 3
+test `$tinc $c3 dump reachable nodes | wc -l` = 3
+
+$tinc $c3 stop
+$tinc $c2 stop
+$tinc $c1 stop