Refactored unit tests
This commit is contained in:
parent
aaccc14e76
commit
4980788afc
20 changed files with 876 additions and 769 deletions
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/expect
|
||||
|
||||
spawn qr-restore.sh --images $short_hash.jpg
|
||||
|
||||
expect {
|
||||
-re {\[sudo\] password for pi:} {
|
||||
test_send "$env(password)\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Please type passphrase and press enter} {
|
||||
test_send "$passphrase\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Show secret \(y or n\)\?} {
|
||||
test_send "y\r"
|
||||
}
|
||||
}
|
||||
|
||||
expect {
|
||||
-re {Secret:\r\n((.|\r\n)+?)\r\nDone} {
|
||||
set restored_secret $expect_out(1,string)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue