Skip to content

Commit

Permalink
test: to embed rule information in the binary, the way test arguments…
Browse files Browse the repository at this point in the history
… are given has been changed.
  • Loading branch information
hitenkoku committed Jun 15, 2024
1 parent 9825636 commit 9d8de52
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 66 deletions.
28 changes: 14 additions & 14 deletions src/afterfact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2285,7 +2285,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -2378,7 +2378,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -2625,7 +2625,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -2728,7 +2728,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -2959,7 +2959,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -3052,7 +3052,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -3294,7 +3294,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -3387,7 +3387,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -3702,7 +3702,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -3796,7 +3796,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -4056,7 +4056,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -4150,7 +4150,7 @@ mod tests {
us_time: false,
utc: true,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -4335,7 +4335,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -4429,7 +4429,7 @@ mod tests {
us_time: false,
utc: true,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
4 changes: 2 additions & 2 deletions src/detections/configs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -2874,7 +2874,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
12 changes: 6 additions & 6 deletions src/detections/detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -1302,7 +1302,7 @@ mod tests {
let cole = Detection::parse_rule_files(
level,
"",
opt_rule_path,
Some(opt_rule_path),
&filter::exclude_ids(&dummy_stored_static),
&dummy_stored_static,
);
Expand Down Expand Up @@ -1511,7 +1511,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -1650,7 +1650,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -1784,7 +1784,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -1934,7 +1934,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/detections/rule/condition_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/detections/rule/count.rs
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/detections/rule/matchers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/detections/rule/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/detections/rule/selectionnodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
2 changes: 1 addition & 1 deletion src/detections/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: Some(Path::new("dummy.html").to_path_buf()),
no_summary: false,
common_options: CommonOptions {
Expand Down
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2385,7 +2385,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -2559,7 +2559,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./test_files/rules/yaml/test_json_detect.yml").to_path_buf(),
rules: Some(Path::new("./test_files/rules/yaml/test_json_detect.yml").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -2647,7 +2647,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("test_files/rules/yaml/test_json_detect.yml").to_path_buf(),
rules: Some(Path::new("test_files/rules/yaml/test_json_detect.yml").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -2734,7 +2734,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./test_files/rules/yaml/test_json_detect.yml").to_path_buf(),
rules: Some(Path::new("./test_files/rules/yaml/test_json_detect.yml").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down Expand Up @@ -2822,7 +2822,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("test_files/rules/yaml/test_json_detect.yml").to_path_buf(),
rules: Some(Path::new("test_files/rules/yaml/test_json_detect.yml").to_path_buf()),
html_report: None,
no_summary: true,
common_options: CommonOptions {
Expand Down
8 changes: 4 additions & 4 deletions src/options/htmlreport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: Some(Path::new("./dummy").to_path_buf()),
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -346,7 +346,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -419,7 +419,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: Some(Path::new("./dummy").to_path_buf()),
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -489,7 +489,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
6 changes: 3 additions & 3 deletions src/options/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -585,7 +585,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down Expand Up @@ -696,7 +696,7 @@ mod tests {
us_time: false,
utc: false,
visualize_timeline: false,
rules: Path::new("./rules").to_path_buf(),
rules: Some(Path::new("./rules").to_path_buf()),
html_report: None,
no_summary: false,
common_options: CommonOptions {
Expand Down
Loading

0 comments on commit 9d8de52

Please sign in to comment.