diff options
Diffstat (limited to 'test/net_defaultgw2.exp')
-rwxr-xr-x | test/net_defaultgw2.exp | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/test/net_defaultgw2.exp b/test/net_defaultgw2.exp new file mode 100755 index 000000000..be9b4882a --- /dev/null +++ b/test/net_defaultgw2.exp | |||
@@ -0,0 +1,65 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # check ip address | ||
8 | send -- "firejail --net=br0 --net=br1 --defaultgw=10.10.30.89\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0\n";exit} | ||
11 | "eth1" | ||
12 | } | ||
13 | expect { | ||
14 | timeout {puts "TESTING ERROR 4\n";exit} | ||
15 | "Child process initialized" | ||
16 | } | ||
17 | |||
18 | # check default gateway | ||
19 | send -- "bash\r" | ||
20 | sleep 1 | ||
21 | send -- "netstat -rn;pwd\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 10.1\n";exit} | ||
24 | "0.0.0.0" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 10.2\n";exit} | ||
28 | "10.10.30.89" | ||
29 | } | ||
30 | expect { | ||
31 | timeout {puts "TESTING ERROR 10.3\n";exit} | ||
32 | "eth1" | ||
33 | } | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 10.4\n";exit} | ||
36 | "10.10.20.0" | ||
37 | } | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 10.5\n";exit} | ||
40 | "0.0.0.0" | ||
41 | } | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 10.6\n";exit} | ||
44 | "eth0" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 10.4\n";exit} | ||
48 | "10.10.30.0" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 10.5\n";exit} | ||
52 | "0.0.0.0" | ||
53 | } | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 10.6\n";exit} | ||
56 | "eth1" | ||
57 | } | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 10\n";exit} | ||
60 | "home" | ||
61 | } | ||
62 | sleep 1 | ||
63 | |||
64 | puts "\n" | ||
65 | |||