aboutsummaryrefslogtreecommitdiffstats
path: root/test/network
diff options
context:
space:
mode:
Diffstat (limited to 'test/network')
-rwxr-xr-xtest/network/netfilter-template.exp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/network/netfilter-template.exp b/test/network/netfilter-template.exp
index 1ad28a103..5a15152d3 100755
--- a/test/network/netfilter-template.exp
+++ b/test/network/netfilter-template.exp
@@ -7,6 +7,14 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10
11send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/blablabla\r"
12expect {
13 timeout {puts "TESTING ERROR 0\n";exit}
14 "invalid network filter file"
15}
16sleep 1
17
10send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r" 18send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r"
11expect { 19expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 20 timeout {puts "TESTING ERROR 1\n";exit}
@@ -15,6 +23,21 @@ expect {
15sleep 1 23sleep 1
16 24
17spawn $env(SHELL) 25spawn $env(SHELL)
26send -- "firejail --netfilter.print=test1\r"
27expect {
28 timeout {puts "TESTING ERROR 1.1\n";exit}
29 "Chain INPUT"
30}
31expect {
32 timeout {puts "TESTING ERROR 1.2\n";exit}
33 "Chain FORWARD"
34}
35expect {
36 timeout {puts "TESTING ERROR 1.3\n";exit}
37 "Chain OUTPUT"
38}
39sleep 1
40
18send -- "telnet 10.10.30.10 5555\r" 41send -- "telnet 10.10.30.10 5555\r"
19expect { 42expect {
20 timeout {puts "TESTING ERROR 2\n";exit} 43 timeout {puts "TESTING ERROR 2\n";exit}