You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tests/CrashKitTests/CrashKitTests.swift
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,9 @@ class TelemetricTests: XCTestCase {
57
57
}
58
58
}
59
59
/**
60
-
* - Fixme: ⚠️️ add doc
60
+
* Test Handling of SIGABRT Signal
61
+
*
62
+
* Simulates receiving a SIGABRT signal and verifies that the crash report is saved correctly with appropriate signal details.
61
63
*/
62
64
func testHandleSignalSIGABRT()throws{
63
65
letsignal:Int32= SIGABRT
@@ -75,7 +77,9 @@ class TelemetricTests: XCTestCase {
75
77
}
76
78
}
77
79
/**
78
-
* - Fixme: ⚠️️ add doc
80
+
* Test Handling of SIGSEGV Signal
81
+
*
82
+
* Simulates receiving a SIGSEGV signal and verifies that the crash report is saved correctly with appropriate signal details.
79
83
*/
80
84
func testHandleSignalSIGSEGV()throws{
81
85
letsignal:Int32= SIGSEGV
@@ -159,7 +163,14 @@ class TelemetricTests: XCTestCase {
159
163
/**
160
164
* Test Redaction of Multiple Patterns in a Single String
161
165
* Test that the redaction logic correctly handles strings containing multiple sensitive data patterns.
162
-
* - Fixme: ⚠️️ add doc
166
+
* - Description: This test verifies that the redaction function correctly handles and redacts multiple sensitive information patterns within a single crash log entry. It ensures that sensitive data such as user emails, credit card numbers, IP addresses, authentication tokens, and private keys are properly redacted according to predefined redaction patterns.
167
+
* - Objective: To ensure the redaction logic robustly identifies and sanitizes multiple types of sensitive information present in the crash log, preventing potential data leaks.
168
+
* - Steps:
169
+
* 1. Prepare a crash log containing multiple sensitive fields.
170
+
* 2. Apply the `redactSensitiveInfo` function to sanitize the crash log.
171
+
* 3. Assert that each sensitive field is properly redacted.
172
+
* 4. Ensure that non-sensitive fields remain untouched.
173
+
* - Note: This test also verifies that the redaction process does not leave any sensitive information accessible in the redacted output.
0 commit comments