mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-22 12:35:13 +00:00
be911b1e16
this new "flavor" of tomb uses veracrypt for mounted volumes and POSIX sh only for its scripting, is a work in progress and still lacks full functionality, but provides a proof-of-concept to be developed further if needs arise.
27 lines
499 B
Bash
27 lines
499 B
Bash
load bats_setup
|
|
|
|
@test "Find the tomb" {
|
|
assert_file_exists "$TOMB"
|
|
>&3 echo "Found: $TOMB"
|
|
}
|
|
|
|
@test "Open tomb with key" {
|
|
mkdir -p "$TOMB".mnt
|
|
./tomb open -k "$TOMB".key "$TOMB" "$TOMB".mnt
|
|
}
|
|
|
|
@test "Check integrity of random data" {
|
|
sha512sum "$TOMB".mnt/random.data | awk '{print $1}'
|
|
cat "$TOMB".hash
|
|
>&2 echo $newhash
|
|
>&2 echo $oldhash
|
|
assert_equal "$newhash" "$oldhash"
|
|
if [ -r "$TOMB".uname ]; then
|
|
>&3 cat "$TOMB".uname
|
|
fi
|
|
}
|
|
|
|
@test "Close tomb" {
|
|
./tomb close "$TOMB"
|
|
}
|