aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/firemon-route.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/firemon-route.exp')
-rwxr-xr-xtest/network/firemon-route.exp40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/network/firemon-route.exp b/test/network/firemon-route.exp
new file mode 100755
index 000000000..2ca6f2fca
--- /dev/null
+++ b/test/network/firemon-route.exp
@@ -0,0 +1,40 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test --net=br0 --ip=10.10.20.50\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14}
15sleep 2
16
17spawn $env(SHELL)
18send -- "firemon --route\r"
19expect {
20 timeout {puts "TESTING ERROR 2\n";exit}
21 "firejail --name=test --net=br0 --ip=10.10.20.50"
22}
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "Route table:"
26}
27expect {
28 timeout {puts "TESTING ERROR 4\n";exit}
29 "0.0.0.0/0 via 10.10.20.1"
30}
31expect {
32 timeout {puts "TESTING ERROR 5\n";exit}
33 "10.10.20.0/24, dev eth0"
34}
35expect {
36 timeout {puts "TESTING ERROR 6\n";exit}
37 "src 10.10.20.50"
38}
39after 500
40puts "\nall done\n"