diff --git a/Tests/Resources/metric-kit-callstack-not-per-thread.json b/Tests/Resources/MetricKitCallstacks/not-per-thread.json similarity index 100% rename from Tests/Resources/metric-kit-callstack-not-per-thread.json rename to Tests/Resources/MetricKitCallstacks/not-per-thread.json diff --git a/Tests/Resources/metric-kit-callstack-per-thread.json b/Tests/Resources/MetricKitCallstacks/per-thread.json similarity index 100% rename from Tests/Resources/metric-kit-callstack-per-thread.json rename to Tests/Resources/MetricKitCallstacks/per-thread.json diff --git a/Tests/Resources/metric-kit-callstack-tree-garbage.json b/Tests/Resources/MetricKitCallstacks/tree-garbage.json similarity index 100% rename from Tests/Resources/metric-kit-callstack-tree-garbage.json rename to Tests/Resources/MetricKitCallstacks/tree-garbage.json diff --git a/Tests/Resources/metric-kit-callstack-tree-real.json b/Tests/Resources/MetricKitCallstacks/tree-real.json similarity index 100% rename from Tests/Resources/metric-kit-callstack-tree-real.json rename to Tests/Resources/MetricKitCallstacks/tree-real.json diff --git a/Tests/Resources/metric-kit-callstack-tree-unknown-fields.json b/Tests/Resources/MetricKitCallstacks/tree-unknown-fields.json similarity index 100% rename from Tests/Resources/metric-kit-callstack-tree-unknown-fields.json rename to Tests/Resources/MetricKitCallstacks/tree-unknown-fields.json diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift index 1e402a6b646..ef64c496804 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXCallStackTreeTests.swift @@ -12,28 +12,28 @@ import MetricKit final class SentryMXCallStackTreeTests: XCTestCase { func testDecodeCallStackTree_PerThread() throws { - let contents = try contentsOfResource("metric-kit-callstack-per-thread") + let contents = try contentsOfResource("MetricKitCallstacks/per-thread") let callStackTree = try SentryMXCallStackTree.from(data: contents) try assertCallStackTree(callStackTree, callStackCount: 2) } func testDecodeCallStackTree_NotPerThread() throws { - let contents = try contentsOfResource("metric-kit-callstack-not-per-thread") + let contents = try contentsOfResource("MetricKitCallstacks/not-per-thread") let callStackTree = try SentryMXCallStackTree.from(data: contents) try assertCallStackTree(callStackTree, perThread: false, framesAmount: 14, threadAttributed: nil, subFrameCount: [2, 4, 0]) } func testDecodeCallStackTree_UnknownFieldsPayload() throws { - let contents = try contentsOfResource("metric-kit-callstack-tree-unknown-fields") + let contents = try contentsOfResource("MetricKitCallstacks/tree-unknown-fields") let callStackTree = try SentryMXCallStackTree.from(data: contents) try assertCallStackTree(callStackTree) } func testDecodeCallStackTree_RealPayload() throws { - let contents = try contentsOfResource("metric-kit-callstack-tree-real") + let contents = try contentsOfResource("MetricKitCallstacks/tree-real") let callStackTree = try SentryMXCallStackTree.from(data: contents) XCTAssertNotNil(callStackTree) @@ -45,7 +45,7 @@ final class SentryMXCallStackTreeTests: XCTestCase { } func testDecodeCallStackTree_GarbagePayload() throws { - let contents = try contentsOfResource("metric-kit-callstack-tree-garbage") + let contents = try contentsOfResource("MetricKitCallstacks/tree-garbage") XCTAssertThrowsError(try SentryMXCallStackTree.from(data: contents)) } diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift index 3e2ff472480..1d27c3c42b5 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMXManagerTests.swift @@ -95,7 +95,7 @@ final class SentryMXManagerTests: XCTestCase { let callStackTree = TestMXCallStackTree() if withCallStackJSON { - callStackTree.overrides.jsonRepresentation = try contentsOfResource("metric-kit-callstack-per-thread") + callStackTree.overrides.jsonRepresentation = try contentsOfResource("MetricKitCallstacks/per-thread") } let crashDiagnostic = TestMXCrashDiagnostic() diff --git a/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift b/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift index 2537a440517..0e8562da7eb 100644 --- a/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift +++ b/Tests/SentryTests/Integrations/MetricKit/SentryMetricKitIntegrationTests.swift @@ -22,10 +22,10 @@ final class SentryMetricKitIntegrationTests: SentrySDKIntegrationTestsBase { override func setUpWithError() throws { try super.setUpWithError() - let contentsPerThread = try contentsOfResource("metric-kit-callstack-per-thread") + let contentsPerThread = try contentsOfResource("MetricKitCallstacks/per-thread") callStackTreePerThread = try SentryMXCallStackTree.from(data: contentsPerThread) - let contentsNotPerThread = try contentsOfResource("metric-kit-callstack-not-per-thread") + let contentsNotPerThread = try contentsOfResource("MetricKitCallstacks/not-per-thread") callStackTreeNotPerThread = try SentryMXCallStackTree.from(data: contentsNotPerThread) // Starting from iOS 15 MetricKit payloads are delivered immediately, so