diff options
Diffstat (limited to 'test/ssh/scp.exp')
-rwxr-xr-x | test/ssh/scp.exp | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/test/ssh/scp.exp b/test/ssh/scp.exp deleted file mode 100755 index 355125751..000000000 --- a/test/ssh/scp.exp +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "ssh firejail-test@0\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" {puts "OK\n"} | ||
11 | "an existing sandbox was detected" {puts "OK\n"} | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "rm -f testfile\r" | ||
16 | after 100 | ||
17 | send -- "exit\r" | ||
18 | sleep 1 | ||
19 | |||
20 | send -- "echo 12345 > testfile\r" | ||
21 | after 100 | ||
22 | send -- "scp testfile firejail-test@0:~/testfile\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 1\n";exit} | ||
25 | "100%" | ||
26 | } | ||
27 | sleep 1 | ||
28 | |||
29 | |||
30 | send -- "ssh firejail-test@0\r" | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 2\n";exit} | ||
33 | "Child process initialized" {puts "OK\n"} | ||
34 | "an existing sandbox was detected" {puts "OK\n"} | ||
35 | } | ||
36 | sleep 1 | ||
37 | send -- "cat testfile\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 3\n";exit} | ||
40 | "12345" | ||
41 | } | ||
42 | after 100 | ||
43 | send -- "exit\r" | ||
44 | sleep 1 | ||
45 | |||
46 | send -- "rm testfile\r" | ||
47 | after 100 | ||
48 | send -- "scp firejail-test@0:~/testfile testfile\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 4\n";exit} | ||
51 | "100%" | ||
52 | } | ||
53 | sleep 1 | ||
54 | send -- "cat testfile\r" | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 5\n";exit} | ||
57 | "12345" | ||
58 | } | ||
59 | after 100 | ||
60 | send -- "rm testfile\r" | ||
61 | sleep 1 | ||
62 | |||
63 | puts "\nall done\n" | ||