diff options
Diffstat (limited to 'test/root/nginx.exp')
-rwxr-xr-x | test/root/nginx.exp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/test/root/nginx.exp b/test/root/nginx.exp deleted file mode 100755 index cb7367729..000000000 --- a/test/root/nginx.exp +++ /dev/null | |||
@@ -1,68 +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 | |||
6 | set timeout 5 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --name=nginx /etc/init.d/nginx start\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
14 | } | ||
15 | sleep 2 | ||
16 | |||
17 | |||
18 | spawn $env(SHELL) | ||
19 | send -- "firejail --tree\r" | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1\n";exit} | ||
22 | "root::nginx: master process /usr/sbin/nginx" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | "www-data::nginx: worker process" | ||
27 | } | ||
28 | sleep 2 | ||
29 | |||
30 | |||
31 | send -- "rm index.html\r" | ||
32 | sleep 1 | ||
33 | send -- "wget 127.0.0.1\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 3\n";exit} | ||
36 | "saved" | ||
37 | } | ||
38 | send -- "cat index.html\r" | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 4\n";exit} | ||
41 | "DOCTYPE html PUBLIC" | ||
42 | } | ||
43 | |||
44 | sleep 1 | ||
45 | send -- "rm index.html\r" | ||
46 | |||
47 | send -- "firejail --join=nginx\r" | ||
48 | sleep 2 | ||
49 | |||
50 | send -- "ls /dev\r" | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 5\n";exit} | ||
53 | "tty0" {puts "TESTING ERROR 6\n";exit} | ||
54 | "ttyS0" {puts "TESTING ERROR 6\n";exit} | ||
55 | "audio" {puts "TESTING ERROR 6\n";exit} | ||
56 | "ppp" {puts "TESTING ERROR 6\n";exit} | ||
57 | "log" | ||
58 | } | ||
59 | sleep 1 | ||
60 | send -- "ls -al /tmp;pwd\r" | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 10\n";exit} | ||
63 | "X11-unix" {puts "TESTING ERROR 11\n";exit} | ||
64 | "/root" | ||
65 | } | ||
66 | sleep 2 | ||
67 | |||
68 | puts "\nall done\n" | ||