Fix async vaccum(info:) tests by using the same encryption level for the destination database

This commit is contained in:
Gwendal Roué committed 2021-12-14 14:21:16 +01:00
1 parent e1984721dc
commit ef4709d3f0
1 file changed
+3 -1
+3 -1
View File
@@ -394,7 +394,9 @@ class DatabaseWriterTests : GRDBTestCase {
let intoPath = NSTemporaryDirectory().appending(ProcessInfo.processInfo.globallyUniqueString).appending("-vacuum-into-db.sqlite")
try await dbWriter.vacuum(into: intoPath)
do {
let dbQueue = try DatabaseQueue(path: intoPath)
// open newly created file and ensure table was copied, and
// encrypted like the original.
let dbQueue = try DatabaseQueue(path: intoPath, configuration: dbWriter.configuration)
let tableExists = try await dbQueue.read { try $0.tableExists("t") }
XCTAssertTrue(tableExists)
}