summaryrefslogtreecommitdiffstats
path: root/test/network/net_defaultgw2.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/net_defaultgw2.exp')
-rwxr-xr-xtest/network/net_defaultgw2.exp40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/network/net_defaultgw2.exp b/test/network/net_defaultgw2.exp
new file mode 100755
index 000000000..db14e17cb
--- /dev/null
+++ b/test/network/net_defaultgw2.exp
@@ -0,0 +1,40 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7# check ip address
8send -- "firejail --net=br0 --net=br1 --defaultgw=10.10.30.89 --protocol=unix,inet,netlink\r"
9expect {
10 timeout {puts "TESTING ERROR 0\n";exit}
11 "eth1"
12}
13expect {
14 timeout {puts "TESTING ERROR 4\n";exit}
15 "Child process initialized"
16}
17sleep 1
18
19# check default gateway
20send -- "ip route show\r"
21expect {
22 timeout {puts "TESTING ERROR 10.1\n";exit}
23 "default via 10.10.30.89 dev eth1"
24}
25
26send -- "ip route show\r"
27expect {
28 timeout {puts "TESTING ERROR 10.2\n";exit}
29 "10.10.20.0/29 dev eth0 proto kernel scope link"
30}
31
32send -- "ip route show\r"
33expect {
34 timeout {puts "TESTING ERROR 10.3\n";exit}
35 "10.10.30.0/24 dev eth1 proto kernel scope link"
36}
37sleep 1
38
39puts "\nall done\n"
40