added better error handling to vault writing, always use a tmp

vault file for writing. added matching unittest to check if
the code catches a disk full error.
This commit is contained in:
TLINDEN
2013-11-09 13:46:40 +01:00
parent bccdaf4ff2
commit 1a772e15b8
28 changed files with 930 additions and 1560 deletions

View File

@@ -329,7 +329,7 @@ dxmorg@florida.cops.gov
<test check-testkey-invalid-id>
prepare = ./invalidkeys
cmd = $pcp -V $vault -S -I testkey-invalid-id
expect /invalid key id/
expect /(invalid key id|could not decode input)/
</test>
<test check-testkey-not-encrypted>
@@ -401,6 +401,13 @@ dxmorg@florida.cops.gov
expect = /ok/
</test>
# this one only works on freebsd for my user. sorrry
<test check-vault-disk-full>
prepare = sudo mdmfs -s 1M -w 1001:1001 md env && dd if=/dev/zero of=env/b bs=1024 count=700
cmd = ./jot 100 | while read N; do if ! (echo a; echo b) | $pcp -V env/v1 -k -x x; then break; fi; done
expect = /Failed to copy/
</test>
#
# input handling tests
<test check-large-meta>