Skip to content

Commit 56dcd95

Browse files
vsilentCopilot
andcommitted
fix: restore mutable enricher in enrichment tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1cf2162 commit 56dcd95

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/collectors/event_enrichment_test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn test_event_enricher_creation() {
1515

1616
#[test]
1717
fn test_enrich_adds_timestamp() {
18-
let enricher = EventEnricher::new().expect("Failed to create enricher");
18+
let mut enricher = EventEnricher::new().expect("Failed to create enricher");
1919
let mut event = SyscallEvent::new(1234, 1000, SyscallType::Execve, Utc::now());
2020

2121
enricher.enrich(&mut event).expect("Failed to enrich");
@@ -26,7 +26,7 @@ fn test_enrich_adds_timestamp() {
2626

2727
#[test]
2828
fn test_enrich_preserves_existing_timestamp() {
29-
let enricher = EventEnricher::new().expect("Failed to create enricher");
29+
let mut enricher = EventEnricher::new().expect("Failed to create enricher");
3030
let original_timestamp = Utc::now();
3131
let mut event = SyscallEvent::new(1234, 1000, SyscallType::Execve, original_timestamp);
3232

@@ -104,7 +104,7 @@ fn test_cgroup_parsing() {
104104

105105
#[test]
106106
fn test_process_tree_enrichment() {
107-
let enricher = EventEnricher::new().expect("Failed to create enricher");
107+
let mut enricher = EventEnricher::new().expect("Failed to create enricher");
108108

109109
// Test that we can get parent PID
110110
let ppid = enricher.get_parent_pid(1); // init process

0 commit comments

Comments
 (0)