aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/net_noip.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/net_noip.exp')
-rwxr-xr-xtest/network/net_noip.exp45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/network/net_noip.exp b/test/network/net_noip.exp
new file mode 100755
index 000000000..b557d116c
--- /dev/null
+++ b/test/network/net_noip.exp
@@ -0,0 +1,45 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10# check ip address
11send -- "firejail --noprofile --net=br0 --ip=none\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "eth0" {puts "TESTING ERROR 1\n";exit}
15 "Child process initialized"
16}
17sleep 1
18send -- "bash\r"
19sleep 1
20
21# no default gateway configured
22send -- "netstat -rn;echo done\r"
23expect {
24 timeout {puts "TESTING ERROR 2\n";exit}
25 "0.0.0.0" {puts "TESTING ERROR 3\n";exit}
26 "eth0" {puts "TESTING ERROR 4\n";exit}
27 "done"
28}
29sleep 1
30
31# eth0 configured
32send -- "/sbin/ifconfig;echo done\r"
33expect {
34 timeout {puts "TESTING ERROR 5\n";exit}
35 "eth0"
36}
37expect {
38 timeout {puts "TESTING ERROR 6\n";exit}
39 "done"
40}
41send -- "exit\r"
42after 100
43
44puts "all done\n"
45