Skip to content

Commit f919cc9

Browse files
vsilentCopilot
andcommitted
fix: handle non-linux unused vars in enrichment tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f1ed8e7 commit f919cc9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/collectors/event_enrichment_test.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ fn test_process_tree_enrichment() {
119119
// PID 1 should exist on Linux
120120
#[cfg(target_os = "linux")]
121121
assert!(ppid.is_some());
122+
#[cfg(not(target_os = "linux"))]
123+
let _ = ppid;
122124
}
123125

124126
#[test]
@@ -131,6 +133,8 @@ fn test_process_comm_enrichment() {
131133
// Should get some process name
132134
#[cfg(target_os = "linux")]
133135
assert!(comm.is_some());
136+
#[cfg(not(target_os = "linux"))]
137+
let _ = comm;
134138
}
135139

136140
#[test]

0 commit comments

Comments
 (0)