mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-11 01:31:38 +00:00
Fix import issues
This commit is contained in:
parent
f553c0c5d3
commit
aa7415f90d
@ -395,7 +395,6 @@ mod tests {
|
||||
use proptest::prelude::*;
|
||||
use onefuzz::expand::GetExpand;
|
||||
use std::collections::HashMap;
|
||||
use crate::test_utils::arbitraries::*;
|
||||
|
||||
use super::CommonConfig;
|
||||
|
||||
@ -416,33 +415,17 @@ mod tests {
|
||||
("task_id", config.task_id.to_string()),
|
||||
("setup_dir", dunce::canonicalize(config.setup_dir.clone()).unwrap().to_string_lossy().to_string()),
|
||||
]);
|
||||
// Look for a shorthand way of doing these optional hashmap inserts
|
||||
// config.instance_telemetry_key.iter().for_each(|key| {
|
||||
// params.insert("instance_telemetry_key", key.to_string());
|
||||
// });
|
||||
match &config.instance_telemetry_key {
|
||||
Some(key) => {
|
||||
params.insert("instance_telemetry_key", key.clone().to_string());
|
||||
},
|
||||
None => {},
|
||||
if let Some(key) = &config.instance_telemetry_key {
|
||||
params.insert("instance_telemetry_key", key.to_string());
|
||||
}
|
||||
match &config.microsoft_telemetry_key {
|
||||
Some(key) => {
|
||||
params.insert("microsoft_telemetry_key", key.clone().to_string());
|
||||
},
|
||||
None => {},
|
||||
if let Some(key) = &config.microsoft_telemetry_key {
|
||||
params.insert("microsoft_telemetry_key", key.clone().to_string());
|
||||
}
|
||||
match &config.extra_setup_dir {
|
||||
Some(dir) => {
|
||||
params.insert("extra_setup_dir", dunce::canonicalize(dir).unwrap().to_string_lossy().to_string());
|
||||
},
|
||||
None => {},
|
||||
if let Some(dir) = &config.extra_setup_dir {
|
||||
params.insert("extra_setup_dir", dunce::canonicalize(dir).unwrap().to_string_lossy().to_string());
|
||||
}
|
||||
match &config.extra_output {
|
||||
Some(dir) => {
|
||||
params.insert("extra_output_dir", dunce::canonicalize(&dir.local_path).unwrap().to_string_lossy().to_string());
|
||||
},
|
||||
None => {},
|
||||
if let Some(dir) = &config.extra_output {
|
||||
params.insert("extra_output_dir", dunce::canonicalize(&dir.local_path).unwrap().to_string_lossy().to_string());
|
||||
}
|
||||
|
||||
for (param, expected) in params.iter() {
|
||||
|
@ -1,4 +1,3 @@
|
||||
#[cfg(test)]
|
||||
pub mod arbitraries {
|
||||
use std::path::PathBuf;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user