Skip to content

Commit

Permalink
fix(vdev): Add --features with default features for vdev test (vect…
Browse files Browse the repository at this point in the history
…ordotdev#17977)

Whenever `features` are not provided. Matches `make test` behavior.

Fixes: vectordotdev#17975

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko committed Jul 14, 2023
1 parent 5dfede4 commit eb4383f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions vdev/src/commands/test.rs
Expand Up @@ -38,13 +38,14 @@ impl Cli {
let runner = get_agent_test_runner(self.container)?;

let mut args = vec!["--workspace".to_string()];
if let Some(extra_args) = &self.args {
args.extend(extra_args.clone());

if !(self.container || extra_args.contains(&"--features".to_string())) {
let features = platform::default_features();
args.extend(["--features".to_string(), features.to_string()]);
}
if let Some(mut extra_args) = self.args {
args.append(&mut extra_args);
}

if !args.contains(&"--features".to_string()) {
let features = platform::default_features();
args.extend(["--features".to_string(), features.to_string()]);
}

runner.test(
Expand Down

0 comments on commit eb4383f

Please sign in to comment.