Remove large temp file after FS tests (#2658)

* Remove large temp file after FS tests

Motivation:

One of the file system tests copies a large file but didn't clear up
after itself.

Modifications:

- Remove the files after the test

Result:

Less disk space used

* remove tmp
This commit is contained in:
George Barnett authored and GitHub committed 2024-02-19 14:42:55 +00:00
1 parent 0fbf6f1e42
commit cfd51e06f5
2 files changed
+6 -1

No files matched your search

@@ -562,6 +562,11 @@ final class FileSystemTests: XCTestCase {
func testCopyLargeFile() async throws {
let sourcePath = try await self.fs.temporaryFilePath()
let destPath = try await self.fs.temporaryFilePath()
self.addTeardownBlock {
_ = try? await self.fs.removeItem(at: sourcePath)
_ = try? await self.fs.removeItem(at: destPath)
}
let sourceInfo = try await self.fs.withFileHandle(
forWritingAt: sourcePath,
options: .newFile(replaceExisting: false)