Add cleanup hook for integration tests
[tinc] / test / basic.test
1 #!/bin/sh
2
3 # shellcheck source=testlib.sh
4 . ./testlib.sh
5
6 echo [STEP] Initialize and test one node
7
8 tinc foo <<EOF
9 init foo
10 set DeviceType dummy
11 set Port 0
12 EOF
13
14 echo [STEP] Test running in the foreground
15
16 create_script foo tinc-up '
17   tinc foo stop &
18 '
19 start_tinc foo -D
20
21 echo [STEP] Test running tinc in the background
22
23 create_script foo tinc-up '
24   tinc foo stop &
25 '
26 start_tinc foo