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.exp49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/network/firemon-route.exp b/test/network/firemon-route.exp
new file mode 100755
index 000000000..19a705778
--- /dev/null
+++ b/test/network/firemon-route.exp
@@ -0,0 +1,49 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --name=test1\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 1
13
14spawn $env(SHELL)
15send -- "firejail --name=test2\r"
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 "Child process initialized"
19}
20sleep 1
21
22spawn $env(SHELL)
23send -- "firemon --route\r"
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "name=test1"
27}
28expect {
29 timeout {puts "TESTING ERROR 3\n";exit}
30 "0.0.0.0/0 via 192.168.1.1, dev eth0, metric 0" {puts "Debian testing\n";}
31 "0.0.0.0/0 via 192.168.1.1, dev enp0s3, metric 1024" {puts "Centos 7 testing\n";}
32 "0.0.0.0/0 via 192.168.1.1, dev enp0s3, metric 0" {puts "OpenSUSE testing\n";}
33 "0.0.0.0/0 via 192.168.1.1, dev enp0s3, metric 100" {puts "Arch testing\n";}
34}
35expect {
36 timeout {puts "TESTING ERROR 4\n";exit}
37 "10.10.30.0/24, dev br1, scope link src 10.10.30.1"
38}
39expect {
40 timeout {puts "TESTING ERROR 5\n";exit}
41 "10.10.50.0/24, dev br3, scope link src 10.10.50.1"
42}
43expect {
44 timeout {puts "TESTING ERROR 6\n";exit}
45 "name=test2"
46}
47after 100
48
49puts "\nalldone\n"