diff options
Diffstat (limited to 'test/root/unbound.exp')
-rwxr-xr-x | test/root/unbound.exp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/test/root/unbound.exp b/test/root/unbound.exp new file mode 100755 index 000000000..9c496306a --- /dev/null +++ b/test/root/unbound.exp | |||
@@ -0,0 +1,48 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 5 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --name=unbound unbound\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 2 | ||
13 | |||
14 | spawn $env(SHELL) | ||
15 | send -- "firejail --tree\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "unbound:unbound" | ||
19 | } | ||
20 | sleep 2 | ||
21 | |||
22 | send -- "tail /var/log/syslog\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 3\n";exit} | ||
25 | "unbound" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 4\n";exit} | ||
29 | "info: start of service" | ||
30 | } | ||
31 | sleep 2 | ||
32 | |||
33 | send -- "firejail --join=unbound\r" | ||
34 | sleep 2 | ||
35 | |||
36 | send -- "ls /dev\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 5\n";exit} | ||
39 | "tty0" {puts "TESTING ERROR 6\n";exit} | ||
40 | "ttyS0" {puts "TESTING ERROR 6\n";exit} | ||
41 | "audio" {puts "TESTING ERROR 6\n";exit} | ||
42 | "ppp" {puts "TESTING ERROR 6\n";exit} | ||
43 | "log" | ||
44 | } | ||
45 | sleep 2 | ||
46 | |||
47 | |||
48 | puts "\nall done\n" | ||