mirror of
https://github.com/sobolevn/git-secret
synced 2024-11-16 21:26:12 +00:00
test cat with wrong filename
This commit is contained in:
parent
02e4bde64e
commit
d5b1dd7829
@ -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 ]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user