3 # shellcheck source=testlib.sh
6 echo [STEP] Initialize one node
17 echo [STEP] Generate an invitation offline and let another node join the VPN
19 invitation=$(tinc foo invite bar)
22 tinc bar join "$invitation"
24 echo [STEP] Test equivalence of host config files
26 diff -w "$DIR_FOO/hosts/foo" "$DIR_BAR/hosts/foo"
27 test "$(grep ^Ed25519PublicKey "$DIR_FOO/hosts/bar")" = "$(grep ^Ed25519PublicKey "$DIR_BAR/hosts/bar")"
29 echo [STEP] Test Mode, Broadcast and ConnectTo statements
31 test "$(tinc bar get Mode)" = switch
32 test "$(tinc bar get Broadcast)" = no
33 test "$(tinc bar get ConnectTo)" = foo
35 echo [STEP] Check whether the new node can join the VPN
42 create_script foo hosts/bar-up
43 create_script bar hosts/foo-up
47 wait_script foo hosts/bar-up
48 wait_script bar hosts/foo-up