2022-11-24 10:16:59 +00:00
|
|
|
//
|
2024-09-06 16:34:30 +03:00
|
|
|
// Copyright 2022-2024 New Vector Ltd.
|
2022-11-24 10:16:59 +00:00
|
|
|
//
|
2024-09-06 16:34:30 +03:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
// Please see LICENSE in the repository root for full details.
|
2022-11-24 10:16:59 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
|
|
|
|
@testable import ElementX
|
|
|
|
|
|
|
|
class TracingConfigurationTests: XCTestCase {
|
2023-01-20 16:40:23 +02:00
|
|
|
func testConfiguration() {
|
2024-02-23 18:29:13 +00:00
|
|
|
let configuration = TracingConfiguration(logLevel: .trace, target: nil)
|
2023-01-20 16:40:23 +02:00
|
|
|
|
|
|
|
let filterComponents = configuration.filter.components(separatedBy: ",")
|
2023-08-30 15:35:49 +03:00
|
|
|
XCTAssertEqual(filterComponents.first, "info")
|
|
|
|
XCTAssertTrue(filterComponents.contains("matrix_sdk_base::sliding_sync=trace"))
|
2023-11-08 18:31:39 +02:00
|
|
|
XCTAssertTrue(filterComponents.contains("matrix_sdk::http_client=debug"))
|
|
|
|
XCTAssertTrue(filterComponents.contains("matrix_sdk_crypto=debug"))
|
2023-08-30 15:35:49 +03:00
|
|
|
XCTAssertTrue(filterComponents.contains("hyper=warn"))
|
2022-11-24 10:16:59 +00:00
|
|
|
}
|
|
|
|
}
|