Skip to content

Commit 73e283b

Browse files
committed
DEMRUM-774 Update Unit Tests
1 parent d9b7e3b commit 73e283b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SplunkAgent/Tests/SplunkAgentTests/Public API/API-1.0-ConfigurationTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ final class API10ConfigurationTests: XCTestCase {
9090
full = full.sessionSamplingRate(0.5)
9191
XCTAssertEqual(full.sessionSamplingRate, 0.5)
9292

93-
var testAttributes = ["key_one": "value_one"]
93+
let testAttributes = MutableAttributes(dictionary: ["key_one": .string("value_one")])
9494
full.globalAttributes = testAttributes
9595
XCTAssertEqual(full.globalAttributes, testAttributes)
9696

97-
testAttributes["key_two"] = "value_two"
97+
testAttributes["key_two"] = .string("value_two")
9898
full = full.globalAttributes(testAttributes)
9999
XCTAssertEqual(full.globalAttributes, testAttributes)
100100

@@ -143,7 +143,7 @@ final class API10ConfigurationTests: XCTestCase {
143143
let appVersion = "0.0.1 Test"
144144
let debugLogging = true
145145
let sampling = 0.4
146-
let globalAttributes = ["test": "value"]
146+
let globalAttributes = MutableAttributes(dictionary: ["test": .string("value")])
147147

148148
// Builder methods
149149
let configuration = try ConfigurationTestBuilder.buildMinimal()

SplunkAgent/Tests/SplunkAgentTests/Testing Support/Builders/ConfigurationTestBuilder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ final class ConfigurationTestBuilder {
4545
configuration.appVersion = appVersion
4646
configuration.enableDebugLogging = true
4747
configuration.sessionSamplingRate = 0.1
48-
configuration.globalAttributes = ["attribute": "value"]
48+
configuration.globalAttributes = MutableAttributes(dictionary: ["attribute": .string("value")])
4949
configuration.spanFilter = { spanData in
5050
spanData
5151
}

0 commit comments

Comments
 (0)