diff options
Diffstat (limited to 'test/features/2.1.exp')
-rwxr-xr-x | test/features/2.1.exp | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/test/features/2.1.exp b/test/features/2.1.exp new file mode 100755 index 000000000..6b2b3f7f5 --- /dev/null +++ b/test/features/2.1.exp | |||
@@ -0,0 +1,99 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # | ||
3 | # hostname | ||
4 | # | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # | ||
11 | # N | ||
12 | # | ||
13 | send -- "firejail --noprofile --hostname=bingo\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 0\n";exit} | ||
16 | "Child process initialized" | ||
17 | } | ||
18 | sleep 1 | ||
19 | |||
20 | send -- "hostname\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 1\n";exit} | ||
23 | "bingo" | ||
24 | } | ||
25 | after 100 | ||
26 | send -- "getent hosts bingo\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
29 | "127.0.0.1" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
33 | "bingo" | ||
34 | } | ||
35 | after 100 | ||
36 | send -- "exit\r" | ||
37 | sleep 1 | ||
38 | |||
39 | |||
40 | # | ||
41 | # O | ||
42 | # | ||
43 | send -- "firejail --noprofile --hostname=bingo --overlay\r" | ||
44 | expect { | ||
45 | timeout {puts "TESTING ERROR 2\n";exit} | ||
46 | "Child process initialized" | ||
47 | } | ||
48 | sleep 1 | ||
49 | |||
50 | send -- "hostname\r" | ||
51 | expect { | ||
52 | timeout {puts "TESTING ERROR 3\n";exit} | ||
53 | "bingo" | ||
54 | } | ||
55 | after 100 | ||
56 | send -- "getent hosts bingo\r" | ||
57 | expect { | ||
58 | timeout {puts "TESTING ERROR 3.1\n";exit} | ||
59 | "127.0.0.1" | ||
60 | } | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 3.2\n";exit} | ||
63 | "bingo" | ||
64 | } | ||
65 | after 100 | ||
66 | send -- "exit\r" | ||
67 | sleep 1 | ||
68 | |||
69 | # | ||
70 | # C | ||
71 | # | ||
72 | send -- "firejail --noprofile --hostname=bingo --chroot=/tmp/chroot\r" | ||
73 | expect { | ||
74 | timeout {puts "TESTING ERROR 4\n";exit} | ||
75 | "Child process initialized" | ||
76 | } | ||
77 | sleep 1 | ||
78 | |||
79 | send -- "hostname\r" | ||
80 | expect { | ||
81 | timeout {puts "TESTING ERROR 5\n";exit} | ||
82 | "bingo" | ||
83 | } | ||
84 | after 100 | ||
85 | send -- "getent hosts bingo\r" | ||
86 | expect { | ||
87 | timeout {puts "TESTING ERROR 5.1\n";exit} | ||
88 | "127.0.0.1" | ||
89 | } | ||
90 | expect { | ||
91 | timeout {puts "TESTING ERROR 5.2\n";exit} | ||
92 | "bingo" | ||
93 | } | ||
94 | after 100 | ||
95 | send -- "exit\r" | ||
96 | sleep 1 | ||
97 | |||
98 | |||
99 | puts "\nall done\n" | ||