Skip to content

Commit

Permalink
test(config): Add tests for SourceOutput::new_maybe_log
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgehermo9 committed Aug 10, 2024
1 parent 866ef73 commit 7573922
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/vector-core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,14 +673,14 @@ mod test {
}

#[test]
fn test_new_log_source_ignores_definition_when_metric_only_data_type() {
fn test_new_log_source_ignores_definition_with_metric_data_type() {
let definition = schema::Definition::any();
let output = SourceOutput::new_maybe_logs(DataType::Metric, definition);
assert_eq!(output.schema_definition(true), None);
}

#[test]
fn test_new_log_source_uses_definition_when_log_data_type() {
fn test_new_log_source_uses_definition_with_log_data_type() {
let definition = schema::Definition::any();
let output = SourceOutput::new_maybe_logs(DataType::Log, definition.clone());
assert_eq!(output.schema_definition(true), Some(definition));
Expand Down

0 comments on commit 7573922

Please sign in to comment.