Skip to content

Commit 1349654

Browse files
committed
Update CrashKitTests.swift
1 parent 10639c8 commit 1349654

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Tests/CrashKitTests/CrashKitTests.swift

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ class TelemetricTests: XCTestCase {
5757
}
5858
}
5959
/**
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.
6163
*/
6264
func testHandleSignalSIGABRT() throws {
6365
let signal: Int32 = SIGABRT
@@ -75,7 +77,9 @@ class TelemetricTests: XCTestCase {
7577
}
7678
}
7779
/**
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.
7983
*/
8084
func testHandleSignalSIGSEGV() throws {
8185
let signal: Int32 = SIGSEGV
@@ -159,7 +163,14 @@ class TelemetricTests: XCTestCase {
159163
/**
160164
* Test Redaction of Multiple Patterns in a Single String
161165
* 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.
163174
*/
164175
func testRedactMultipleSensitiveInfo() throws {
165176
let crashLog: [String: String] = [

0 commit comments

Comments
 (0)