set error state if cipher_migrate fails

This commit is contained in:
Stephen Lombardo
2021-10-08 16:50:57 -04:00
parent 99d36b40c8
commit 78796fd0e2
6 changed files with 186 additions and 49 deletions
+8 -8
View File
@@ -66,7 +66,7 @@ do_test codec-error-journal-delete {
catchsql {
PRAGMA key = 'testkey';
PRAGMA cipher_test = fail_next_encrypt;
PRAGMA cipher_test_on = fail_encrypt;
UPDATE t1 SET b = 'fail' WHERE a = 5000;
}
@@ -74,7 +74,7 @@ do_test codec-error-journal-delete {
sqlite_orig db test.db
execsql {
PRAGMA cipher_test = fail_next_encrypt;
PRAGMA cipher_test_off = fail_encrypt;
PRAGMA key = 'testkey';
PRAGMA cipher_integrity_check;
PRAGMA integrity_check;
@@ -92,7 +92,7 @@ do_test codec-error-journal-wal {
catchsql {
PRAGMA key = 'testkey';
PRAGMA cipher_test = fail_next_encrypt;
PRAGMA cipher_test_on = fail_encrypt;
UPDATE t1 SET b = 'fail' WHERE a = 5000;
}
@@ -100,7 +100,7 @@ do_test codec-error-journal-wal {
sqlite_orig db test.db
execsql {
PRAGMA cipher_test = fail_next_encrypt;
PRAGMA cipher_test_off = fail_encrypt;
PRAGMA key = 'testkey';
PRAGMA cipher_integrity_check;
PRAGMA integrity_check;
@@ -120,7 +120,7 @@ do_test codec-error-journal-wal-transaction {
PRAGMA key = 'testkey';
BEGIN;
UPDATE t1 SET b = 'success' WHERE a = 1;
PRAGMA cipher_test = fail_next_encrypt;
PRAGMA cipher_test_on = fail_encrypt;
UPDATE t1 SET b = 'fail' WHERE a = 5000;
COMMIT;
}
@@ -129,7 +129,7 @@ do_test codec-error-journal-wal-transaction {
sqlite_orig db test.db
execsql {
PRAGMA cipher_test = fail_next_encrypt;
PRAGMA cipher_test_off = fail_encrypt;
PRAGMA key = 'testkey';
PRAGMA cipher_integrity_check;
PRAGMA integrity_check;
@@ -149,7 +149,7 @@ do_test codec-error-journal-wal-read {
catchsql {
PRAGMA key = 'testkey';
SELECT count(*) FROM sqlite_schema;
PRAGMA cipher_test = fail_next_decrypt;
PRAGMA cipher_test_on = fail_decrypt;
UPDATE t1 SET b = 'fail' WHERE a = 5000;
}
@@ -157,7 +157,7 @@ do_test codec-error-journal-wal-read {
sqlite_orig db test.db
execsql {
PRAGMA cipher_test = fail_next_decrypt;
PRAGMA cipher_test_off = fail_decrypt;
PRAGMA key = 'testkey';
PRAGMA cipher_integrity_check;
PRAGMA integrity_check;