aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/netfilter-template.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/netfilter-template.exp')
-rwxr-xr-xtest/network/netfilter-template.exp67
1 files changed, 0 insertions, 67 deletions
diff --git a/test/network/netfilter-template.exp b/test/network/netfilter-template.exp
deleted file mode 100755
index 0a3386965..000000000
--- a/test/network/netfilter-template.exp
+++ /dev/null
@@ -1,67 +0,0 @@
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
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
18send -- "firejail --net=br1 --ip=10.10.30.10 --name=test1 --netfilter=/etc/firejail/tcpserver.net,5555 ./tcpserver 5555\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
22}
23sleep 1
24
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
41send -- "telnet 10.10.30.10 5555\r"
42expect {
43 timeout {puts "TESTING ERROR 2\n";exit}
44 "Connected to 10.10.30.10"
45}
46sleep 1
47
48send "sdfklsjadfl;ksadjfl;sdkfj\r"
49expect {
50 timeout {puts "TESTING ERROR 3\n";exit}
51 "response"
52}
53expect {
54 timeout {puts "TESTING ERROR 4\n";exit}
55 "Connection closed"
56}
57sleep 1
58
59send -- "telnet 10.10.30.10 5556\r"
60expect {
61 timeout {puts "OK\n"}
62 "Connected to 10.10.30.10" {puts "TESTING ERROR 6\n";exit}
63 "dikasdfjasdjf"
64}
65
66after 100
67puts "all done\n"