test cat with wrong filename

This commit is contained in:
Josh Rabinowitz 2018-04-14 09:28:05 -04:00
parent 02e4bde64e
commit d5b1dd7829

View File

@ -29,6 +29,7 @@ function teardown {
@test "run 'cat' with password argument" {
cp "$FILE_TO_HIDE" "${FILE_TO_HIDE}2"
rm -f "$FILE_TO_HIDE"
local password=$(test_user_password "$TEST_DEFAULT_USER")
@ -38,6 +39,12 @@ function teardown {
# $output is the output from 'git secret cat' above
[ "$FILE_CONTENTS" == "$output" ]
rm "${FILE_TO_HIDE}2"
}
@test "run 'cat' with wrong filename" {
run git secret reveal -d "$TEST_GPG_HOMEDIR" -p "$password" NO_SUCH_FILE
[ "$status" -eq 2 ]
}