mirror of
https://github.com/deajan/obackup.git
synced 2024-12-24 14:33:41 +01:00
Added more gpg tests
This commit is contained in:
parent
5a8d1ab811
commit
6a1b2b9d48
@ -214,14 +214,33 @@ function test_Merge () {
|
||||
}
|
||||
|
||||
function test_GPG () {
|
||||
echo "Encrypting file"
|
||||
$CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TEST_FILE$CRYPT_EXTENSION" --recipient "John Doe" --batch --yes --encrypt "$TESTS_DIR/$PASSFILE"
|
||||
assertEquals "Encrypt file" "0" $?
|
||||
|
||||
echo "Decrypt using passphrase file"
|
||||
$CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TEST_FILE" --batch --yes --passphrase-file="$TESTS_DIR/$PASSFILE" --decrypt "$TESTS_DIR/$CRYPT_TEST_FILE$CRYPT_EXTENSION"
|
||||
assertEquals "Decrypt file using passfile" "0" $?
|
||||
|
||||
echo "Decrypt using passphrase"
|
||||
$CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TEST_FILE" --batch --yes --passphrase PassPhrase123 --decrypt "$TESTS_DIR/$CRYPT_TEST_FILE$CRYPT_EXTENSION"
|
||||
assertEquals "Decrypt file using passphrase" "0" $?
|
||||
|
||||
echo "Decrypt using passphrase file with cat"
|
||||
$CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TEST_FILE" --batch --yes --passphrase $(cat "$TESTS_DIR/$PASSFILE") --decrypt "$TESTS_DIR/$CRYPT_TEST_FILE$CRYPT_EXTENSION"
|
||||
assertEquals "Decrypt file using passphrase" "0" $?
|
||||
|
||||
echo "Decrypt using passphrase file --no-use-agent"
|
||||
$CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TEST_FILE" --no-use-agent --batch --yes --passphrase-file="TESTS_DIR/$PASSFILE" --decrypt "$TESTS_DIR/$CRYPT_TEST_FILE$CRYPT_EXTENSION"
|
||||
assertEquals "Decrypt file using passphrase" "0" $?
|
||||
|
||||
echo "Decrypt using passphrase --no-use-agent"
|
||||
$CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TEST_FILE" --no-use-agent --batch --yes --passphrase PassPhrase123 --decrypt "$TESTS_DIR/$CRYPT_TEST_FILE$CRYPT_EXTENSION"
|
||||
assertEquals "Decrypt file using passphrase" "0" $?
|
||||
|
||||
echo "Decrypt using passphrase file with cat --no-use-agent"
|
||||
$CRYPT_TOOL --out "$TESTS_DIR/$CRYPT_TEST_FILE" --no-use-agent --batch --yes --passphrase $(cat "$TESTS_DIR/$PASSFILE") --decrypt "$TESTS_DIR/$CRYPT_TEST_FILE$CRYPT_EXTENSION"
|
||||
assertEquals "Decrypt file using passphrase" "0" $?
|
||||
}
|
||||
|
||||
function test_LocalRun () {
|
||||
|
Loading…
Reference in New Issue
Block a user