Skip to content

Commit

Permalink
Add test for observe options proto-messages
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryAstafyev committed Nov 13, 2024
1 parent e0c13b2 commit a250f65
Show file tree
Hide file tree
Showing 11 changed files with 388 additions and 87 deletions.
156 changes: 121 additions & 35 deletions application/apps/indexer/Cargo.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions application/apps/indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ members = [
log = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
thiserror = "2.0"
lazy_static = "1.4"
tokio = { version = "1", features = ["full"] }
tokio-stream = "0.1"
Expand All @@ -34,7 +34,8 @@ dirs = "5.0"
uuid = "1.3"
grep-searcher = "0.1"
tempfile = "3.10.0"
env_logger = "0.10"
env_logger = "0.11"
enum_ids = "0.5"

## Development Dependencies ##
# Support for `html_reports` needs running the benchmarks via `cargo-criterion` tool.
Expand Down
2 changes: 1 addition & 1 deletion application/apps/indexer/session/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ tokio-stream.workspace = true
tokio-util.workspace = true
uuid = { workspace = true , features = ["serde", "v4"] }
walkdir = "2.3"
enum_ids = "0.5"
enum_ids.workspace = true

[dev-dependencies]
lazy_static.workspace = true
Expand Down
1 change: 1 addition & 0 deletions application/apps/indexer/sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ uuid = { workspace = true , features = ["serde", "v4"] }
regex.workspace = true
lazy_static.workspace = true
shellexpand = "3.0.0"
enum_ids.workspace = true

[dev-dependencies]
env_logger.workspace = true
Expand Down
8 changes: 6 additions & 2 deletions application/apps/indexer/sources/src/factory.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
pub use dlt::DltFilterConfig;
use enum_ids::enum_ids;
pub use indexer_base::config::MulticastInfo;
use parsers::dlt;
use serde::{Deserialize, Serialize};
use std::{collections::HashMap, path::PathBuf};
use uuid::Uuid;

pub use dlt::DltFilterConfig;

#[allow(clippy::large_enum_variant)]
#[enum_ids(derive = "Debug")]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum ParserType {
Dlt(DltParserSettings),
Expand Down Expand Up @@ -69,6 +70,7 @@ pub struct SomeIpParserSettings {
pub fibex_file_paths: Option<Vec<String>>,
}

#[enum_ids(derive = "Debug")]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum Transport {
Process(ProcessTransportConfig),
Expand Down Expand Up @@ -107,6 +109,7 @@ pub struct UDPTransportConfig {
pub multicast: Vec<MulticastInfo>,
}

#[enum_ids(derive = "Debug")]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum FileFormat {
PcapNG,
Expand All @@ -115,6 +118,7 @@ pub enum FileFormat {
Binary,
}

#[enum_ids(derive = "Debug")]
#[derive(Debug, Serialize, Deserialize, Clone)]
pub enum ObserveOrigin {
File(String, FileFormat, PathBuf),
Expand Down
Loading

0 comments on commit a250f65

Please sign in to comment.