Skip to content

Commit

Permalink
Fix tests after update
Browse files Browse the repository at this point in the history
  • Loading branch information
louiszawadzki committed Jan 10, 2024
1 parent 00ba7ee commit aeff35b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/core/ios/Tests/AnyEncodableTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ internal class AnyEncodableTests: XCTestCase {
],
"boolean" : true,
"date" : "1970-01-01T00:00:00Z",
"double" : 3.1415926535897931,
"double" : 3.141592653589793,
"integer" : 42,
"nested" : {
"a" : "alpha",
Expand Down
4 changes: 4 additions & 0 deletions packages/core/ios/Tests/MockRUMMonitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
@testable import DatadogSDKReactNative

internal class MockRUMMonitor: RUMMonitorProtocol {
func currentSessionID(completion: @escaping (String?) -> Void) {
// not implemented
}

init () {
self.debug = false
}
Expand Down
16 changes: 12 additions & 4 deletions packages/core/ios/Tests/RUMMocks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,17 @@ extension RUMResourceEvent: RandomMockable {
configuration: nil,
discarded: nil,
rulePsr: nil,
session: .init(plan: .plan1),
session: .init(plan: .plan1, sessionPrecondition: nil),
spanId: .mockRandom(),
traceId: .mockRandom()
),
action: .init(id: .mockRandom()),
application: .init(id: .mockRandom()),
buildId: nil,
buildVersion: nil,
ciTest: nil,
connectivity: .mockRandom(),
container: nil,
context: .init(contextInfo: ["_dd.resource.drop_resource": true] ),
date: .mockRandom(),
device: .mockRandom(),
Expand Down Expand Up @@ -319,15 +321,17 @@ extension RUMResourceEvent: RandomMockable {
configuration: nil,
discarded: nil,
rulePsr: nil,
session: .init(plan: .plan1),
session: .init(plan: .plan1, sessionPrecondition: nil),
spanId: .mockRandom(),
traceId: .mockRandom()
),
action: .init(id: .mockRandom()),
application: .init(id: .mockRandom()),
buildId: nil,
buildVersion: nil,
ciTest: nil,
connectivity: .mockRandom(),
container: nil,
context: .mockRandom(),
date: .mockRandom(),
device: .mockRandom(),
Expand Down Expand Up @@ -386,7 +390,7 @@ extension RUMActionEvent: RandomMockable {
),
browserSdkVersion: nil,
configuration: nil,
session: .init(plan: .plan1)
session: .init(plan: .plan1, sessionPrecondition: nil)
),
action: .init(
crash: .init(count: .mockRandom()),
Expand All @@ -400,9 +404,11 @@ extension RUMActionEvent: RandomMockable {
type: [.tap, .swipe, .scroll].randomElement()!
),
application: .init(id: .mockRandom()),
buildId: nil,
buildVersion: nil,
ciTest: nil,
connectivity: .mockRandom(),
container: nil,
context: .init(contextInfo: ["_dd.resource.drop_resource": true] ),
date: .mockRandom(),
device: .mockRandom(),
Expand Down Expand Up @@ -440,7 +446,7 @@ extension RUMActionEvent: RandomMockable {
),
browserSdkVersion: nil,
configuration: nil,
session: .init(plan: .plan1)
session: .init(plan: .plan1, sessionPrecondition: nil)
),
action: .init(
crash: .init(count: .mockRandom()),
Expand All @@ -454,9 +460,11 @@ extension RUMActionEvent: RandomMockable {
type: [.tap, .swipe, .scroll].randomElement()!
),
application: .init(id: .mockRandom()),
buildId: nil,
buildVersion: nil,
ciTest: nil,
connectivity: .mockRandom(),
container: nil,
context: .mockRandom(),
date: .mockRandom(),
device: .mockRandom(),
Expand Down

0 comments on commit aeff35b

Please sign in to comment.