Skip to content

Commit c648408

Browse files
committed
Ensure file can be cleaned up
1 parent e48d146 commit c648408

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Tests/SQLiteTests/CipherTests.swift

+5
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ class CipherTests: XCTestCase {
8888
try! FileManager.default.setAttributes([FileAttributeKey.immutable : 1], ofItemAtPath: encryptedFile)
8989
XCTAssertFalse(FileManager.default.isWritableFile(atPath: encryptedFile))
9090

91+
defer {
92+
// ensure file can be cleaned up afterwards
93+
try! FileManager.default.setAttributes([FileAttributeKey.immutable : 0], ofItemAtPath: encryptedFile)
94+
}
95+
9196
let conn = try! Connection(encryptedFile)
9297
try! conn.key("sqlcipher-test")
9398
XCTAssertEqual(1, try! conn.scalar("SELECT count(*) FROM foo") as? Int64)

0 commit comments

Comments
 (0)