summaryrefslogtreecommitdiff
path: root/tests/t0300-reencryption.sh
diff options
context:
space:
mode:
authorAldis Berjoza <aldis@berjoza.lv>2018-08-08 22:23:23 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2018-08-09 19:37:50 -0700
commitd68d9c50db4cdba32266c52e6546f1d5181948db (patch)
tree5fd5dd02301649d5099751a893c5cd294308b67b /tests/t0300-reencryption.sh
parent74fdfb5022f317ad48d449e29543710bdad1afda (diff)
downloadpass-d68d9c50db4cdba32266c52e6546f1d5181948db.tar.gz
pass-d68d9c50db4cdba32266c52e6546f1d5181948db.tar.bz2
pass-d68d9c50db4cdba32266c52e6546f1d5181948db.zip
Do not reencrypt symbolic links
Diffstat (limited to 'tests/t0300-reencryption.sh')
-rwxr-xr-xtests/t0300-reencryption.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/t0300-reencryption.sh b/tests/t0300-reencryption.sh
index 6d15364..3c88987 100755
--- a/tests/t0300-reencryption.sh
+++ b/tests/t0300-reencryption.sh
@@ -87,6 +87,15 @@ test_expect_success 'Reencryption subfolder multiple keys, move, deinit' '
[[ $(canonicalize_gpg_keys $KEY3 $KEY4 $KEY2) == "$(gpg_keys_from_encrypted_file "$PASSWORD_STORE_DIR/anotherfolder2/anotherfolder/cred1.gpg")" ]]
'
+test_expect_success 'Reencryption skips links' '
+ ln -s "$PASSWORD_STORE_DIR/folder/cred1.gpg" "$PASSWORD_STORE_DIR/folder/linked_cred.gpg" &&
+ [[ -L $PASSWORD_STORE_DIR/folder/linked_cred.gpg ]] &&
+ git add "$PASSWORD_STORE_DIR/folder/linked_cred.gpg" &&
+ git commit "$PASSWORD_STORE_DIR/folder/linked_cred.gpg" -m "Added linked cred" &&
+ "$PASS" init -p folder $KEY3 &&
+ [[ -L $PASSWORD_STORE_DIR/folder/linked_cred.gpg ]]
+'
+
#TODO: test with more varieties of move and copy!
test_expect_success 'Password lived through all transformations' '