3 # shellcheck disable=SC1090
6 echo [STEP] Initialize two nodes
26 echo [STEP] Exchange host config files
28 tinc foo export | tinc bar exchange | tinc foo import
29 tinc bar add ConnectTo foo
31 echo [STEP] Foo 1.1, bar 1.0
33 tinc bar set ExperimentalProtocol no
34 tinc foo del bar.Ed25519PublicKey
35 tinc bar del foo.Ed25519PublicKey
37 create_script foo hosts/bar-up
38 create_script bar hosts/foo-up
43 wait_script foo hosts/bar-up
44 wait_script bar hosts/foo-up
52 test -z "$(tinc foo get bar.Ed25519PublicKey)"
53 test -z "$(tinc bar get foo.Ed25519PublicKey)"
55 echo [STEP] Foo 1.1, bar upgrades to 1.1
57 tinc bar del ExperimentalProtocol
62 wait_script foo hosts/bar-up
63 wait_script bar hosts/foo-up
71 test -n "$(tinc foo get bar.Ed25519PublicKey)"
72 test -n "$(tinc bar get foo.Ed25519PublicKey)"
74 echo [STEP] Bar downgrades, must no longer be allowed to connect
76 tinc bar set ExperimentalProtocol no
78 create_script foo subnet-up
80 wait_script foo subnet-up
82 create_script bar subnet-up
84 wait_script bar subnet-up
86 # There is no reliable way to wait for 'not connecting'.