From ef4709d3f09fc5dc51817633b64e01fdb9cfb7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Tue, 14 Dec 2021 14:21:16 +0100 Subject: [PATCH] Fix async vaccum(info:) tests by using the same encryption level for the destination database --- Tests/GRDBTests/DatabaseWriterTests.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tests/GRDBTests/DatabaseWriterTests.swift b/Tests/GRDBTests/DatabaseWriterTests.swift index 3d0bbfe16..61ae91f99 100644 --- a/Tests/GRDBTests/DatabaseWriterTests.swift +++ b/Tests/GRDBTests/DatabaseWriterTests.swift @@ -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) }