Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
philipphofmann committed Nov 5, 2024
1 parent 22a374b commit 65e2095
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Tests/SentryTests/SentryScopeSwiftTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ class SentryScopeSwiftTests: XCTestCase {
transaction = SentryTracer(transactionContext: TransactionContext(name: transactionName, operation: transactionOperation), hub: nil)
}

var contextWithTraceContext: [String: [String: String]] {
var expectedContext = context
expectedContext["trace"] = scope.propagationContext.traceForEvent()
return expectedContext
}

var observer: TestScopeObserver {
return TestScopeObserver()
}
Expand Down Expand Up @@ -113,7 +107,10 @@ class SentryScopeSwiftTests: XCTestCase {
XCTAssertEqual(["key": "value"], actual["tags"] as? [String: String])
XCTAssertEqual(["key": "value"], actual["extra"] as? [String: String])

XCTAssertEqual(fixture.contextWithTraceContext, actual["context"] as? [String: [String: String]])
XCTAssertEqual(fixture.context, actual["context"] as? [String: [String: String]])

let propagationContext = fixture.scope.propagationContext
XCTAssertEqual(["span_id": propagationContext.spanId.sentrySpanIdString, "trace_id": propagationContext.traceId.sentryIdString], actual["traceContext"] as? [String: String])

let actualUser = actual["user"] as? [String: Any]
XCTAssertEqual(fixture.ipAddress, actualUser?["ip_address"] as? String)
Expand Down

0 comments on commit 65e2095

Please sign in to comment.