mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Refactor Rageshake URL and Target configuration. (#4337)
* Move the rageshakeURL configuration from the BugReportService to AppSettings. * Refactor Target to return a handle when configuring. This helps with reconfiguration and removes the @MainActor constraint.
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
import XCTest
|
||||
|
||||
class LoggingTests: XCTestCase {
|
||||
static var targetConfiguration: Target.Configuration?
|
||||
|
||||
private enum Constants {
|
||||
static let genericFailure = "Test failed"
|
||||
}
|
||||
@@ -22,7 +24,9 @@ class LoggingTests: XCTestCase {
|
||||
let target = "tests"
|
||||
XCTAssertTrue(Tracing.logFiles.isEmpty)
|
||||
|
||||
await Target.tests.configure(logLevel: .info, traceLogPacks: [], sentryURL: nil)
|
||||
if Self.targetConfiguration == nil {
|
||||
Self.targetConfiguration = Target.tests.configure(logLevel: .info, traceLogPacks: [], sentryURL: nil)
|
||||
}
|
||||
|
||||
// There is something weird with Rust logging where the file writing handle doesn't
|
||||
// notice that the file it is writing to was deleted, so we can't run these checks
|
||||
@@ -175,7 +179,9 @@ class LoggingTests: XCTestCase {
|
||||
contentType: nil))
|
||||
|
||||
// When logging that value
|
||||
await Target.tests.configure(logLevel: .info, traceLogPacks: [], sentryURL: nil)
|
||||
if Self.targetConfiguration == nil {
|
||||
Self.targetConfiguration = Target.tests.configure(logLevel: .info, traceLogPacks: [], sentryURL: nil)
|
||||
}
|
||||
|
||||
MXLog.info(textMessage)
|
||||
MXLog.info(noticeMessage)
|
||||
|
||||
Reference in New Issue
Block a user