diff options
Diffstat (limited to 'test/login_ssh.exp')
-rwxr-xr-x | test/login_ssh.exp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/test/login_ssh.exp b/test/login_ssh.exp deleted file mode 100755 index db0721d25..000000000 --- a/test/login_ssh.exp +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "ssh bingo@0\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "password:" { | ||
11 | puts "\nTESTING: please enter SSH password" | ||
12 | set oldmode [stty -echo -raw] | ||
13 | expect_user -re "(.*)\n" | ||
14 | send_user "\n" | ||
15 | eval stty $oldmode | ||
16 | # stty echo | ||
17 | set pass $expect_out(1,string) | ||
18 | send -- "$pass\r" | ||
19 | puts "TESTING: password sent to the server" | ||
20 | } | ||
21 | "Child process initialized" | ||
22 | } | ||
23 | sleep 1 | ||
24 | |||
25 | # test default gw | ||
26 | send -- "bash\r" | ||
27 | sleep 1 | ||
28 | send -- "ps aux; pwd\r" | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 1\n";exit} | ||
31 | "/bin/bash" | ||
32 | } | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 2\n";exit} | ||
35 | "bash" | ||
36 | } | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 3\n";exit} | ||
39 | "ps aux" | ||
40 | } | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 4\n";exit} | ||
43 | "home" | ||
44 | } | ||
45 | sleep 1 | ||
46 | |||
47 | |||
48 | send -- "ps aux |wc -l; pwd\r" | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 5\n";exit} | ||
51 | "6" | ||
52 | } | ||
53 | expect { | ||
54 | timeout {puts "TESTING ERROR 6\n";exit} | ||
55 | "home" | ||
56 | } | ||
57 | sleep 1 | ||
58 | |||
59 | puts "\nall done\n" | ||