3 # shellcheck disable=SC1090
6 echo [STEP] Initialize three nodes
27 echo [STEP] Test import, export and exchange commands
29 tinc foo export | tinc bar exchange | tinc foo import
31 echo [STEP] Test export-all and exchange-all
33 tinc foo export-all | tinc baz exchange | tinc foo import
34 tinc foo exchange-all </dev/null | tinc bar import
36 echo [STEP] Test equivalence of host config files
38 diff -w "$DIR_FOO/hosts/foo" "$DIR_BAR/hosts/foo"
39 diff -w "$DIR_FOO/hosts/foo" "$DIR_BAZ/hosts/foo"
40 diff -w "$DIR_FOO/hosts/bar" "$DIR_BAR/hosts/bar"
41 diff -w "$DIR_FOO/hosts/bar" "$DIR_BAZ/hosts/bar"
42 diff -w "$DIR_FOO/hosts/baz" "$DIR_BAR/hosts/baz"
43 diff -w "$DIR_FOO/hosts/baz" "$DIR_BAZ/hosts/baz"
45 echo [STEP] Check whether the nodes can connect to each other
47 create_script foo tinc-up '
48 tinc bar add ConnectTo foo
49 tinc baz add ConnectTo foo
52 create_script foo hosts/bar-up
53 create_script foo hosts/baz-up
57 wait_script foo tinc-up
62 wait_script foo hosts/bar-up
63 wait_script foo hosts/baz-up