aboutsummaryrefslogtreecommitdiffstats
path: root/test/servers4.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/servers4.exp')
-rwxr-xr-xtest/servers4.exp32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/servers4.exp b/test/servers4.exp
new file mode 100755
index 000000000..9feeecf61
--- /dev/null
+++ b/test/servers4.exp
@@ -0,0 +1,32 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "sudo ls; sudo whoami; sudo pwd\r"
8expect {
9 timeout {puts "TESTING ERROR: you need to root run this test as root\n";exit}
10 "root"
11}
12
13send -- "firejail --net=br0 --ip=10.10.20.5 --seccomp\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 2
19
20send -- "/etc/init.d/isc-dhcp-server start\r"
21sleep 5
22
23
24send -- "ps aux; pwd\r"
25expect {
26 timeout {puts "TESTING ERROR 1\n";exit}
27 "dhcpd"
28}
29
30send -- "exit\r"
31sleep 1
32puts "\n"