diff --git a/Tests/SentryTests/Helper/SentryFileManagerTests.swift b/Tests/SentryTests/Helper/SentryFileManagerTests.swift index a00e96179b2..7093f9cac08 100644 --- a/Tests/SentryTests/Helper/SentryFileManagerTests.swift +++ b/Tests/SentryTests/Helper/SentryFileManagerTests.swift @@ -157,7 +157,10 @@ class SentryFileManagerTests: XCTestCase { sut.deleteOldEnvelopeItems() - let logMessages = logOutput.loggedMessages.filter { $0.contains("Ignoring .DS_Store file when building envelopes path at path: \(dsStoreFile)") } + let logMessages = logOutput.loggedMessages.filter { + $0.contains("[Sentry] [debug]") && + $0.contains("Ignoring .DS_Store file when building envelopes path at path: \(dsStoreFile)") + } expect(logMessages.count) == 1 try FileManager.default.removeItem(atPath: dsStoreFile) @@ -177,7 +180,10 @@ class SentryFileManagerTests: XCTestCase { sut.deleteOldEnvelopeItems() - let logMessages = logOutput.loggedMessages.filter { $0.contains("Ignoring non directory when deleting old envelopes at path: \(textFilePath)") } + let logMessages = logOutput.loggedMessages.filter { + $0.contains("[Sentry] [debug]") && + $0.contains("Ignoring non directory when deleting old envelopes at path: \(textFilePath)") + } expect(logMessages.count) == 1 try FileManager.default.removeItem(atPath: textFilePath) @@ -195,7 +201,10 @@ class SentryFileManagerTests: XCTestCase { expect(sut.getEnvelopesPath(nonExistentFile)) == nil - let logMessages = logOutput.loggedMessages.filter { $0.contains("Could not get attributes of item at path: \(nonExistentFileFullPath)") } + let logMessages = logOutput.loggedMessages.filter { + $0.contains("[Sentry] [warning]") && + $0.contains("Could not get attributes of item at path: \(nonExistentFileFullPath)") + } expect(logMessages.count) == 1 }