diff --git a/src/agent/onefuzz-agent/src/agent/tests.rs b/src/agent/onefuzz-agent/src/agent/tests.rs index 23d263ad005..a27c7365fce 100644 --- a/src/agent/onefuzz-agent/src/agent/tests.rs +++ b/src/agent/onefuzz-agent/src/agent/tests.rs @@ -35,6 +35,7 @@ impl Fixture { work_queue, worker_runner, None, + true, ) } diff --git a/src/agent/onefuzz/src/expand.rs b/src/agent/onefuzz/src/expand.rs index 0317aa282b0..9b0088870f1 100644 --- a/src/agent/onefuzz/src/expand.rs +++ b/src/agent/onefuzz/src/expand.rs @@ -520,12 +520,11 @@ mod tests { #[tokio::test] async fn test_expand_machine_id() -> Result<()> { let machine_id = Uuid::new_v4(); - let expand = Expand::new(&MachineIdentity { - machine_id: machine_id, + let machine_identity = &MachineIdentity { + machine_id, ..Default::default() - }) - .machine_id() - .await?; + }; + let expand = Expand::new(&machine_identity).machine_id().await?; let expanded = expand.evaluate_value("{machine_id}")?; // Check that "{machine_id}" expands to a valid UUID, but don't worry about the actual value. let expanded_machine_id = Uuid::parse_str(&expanded)?; diff --git a/src/agent/onefuzz/src/libfuzzer.rs b/src/agent/onefuzz/src/libfuzzer.rs index 43eb4a4fae8..ec6aeec2623 100644 --- a/src/agent/onefuzz/src/libfuzzer.rs +++ b/src/agent/onefuzz/src/libfuzzer.rs @@ -445,6 +445,7 @@ mod tests { options.clone(), env.clone(), &temp_setup_dir.path(), + MachineIdentity::default(), ); // verify catching bad exits with -help=1 @@ -473,6 +474,7 @@ mod tests { options.clone(), env.clone(), &temp_setup_dir.path(), + MachineIdentity::default(), ); // verify good exits with -help=1 assert!( diff --git a/src/agent/onefuzz/src/machine_id.rs b/src/agent/onefuzz/src/machine_id.rs index d608a95e3d9..f0949b28ada 100644 --- a/src/agent/onefuzz/src/machine_id.rs +++ b/src/agent/onefuzz/src/machine_id.rs @@ -28,9 +28,6 @@ const VM_NAME_URL: &str = const VM_SCALESET_NAME: &str = "http://169.254.169.254/metadata/instance/compute/vmScaleSetName?api-version=2020-06-01&format=text"; -const COMPUTE_METADATA_URL: &str = - "http://169.254.169.254/metadata/instance/compute?api-version=2020-06-01"; - impl MachineIdentity { pub async fn from_metadata() -> Result { let machine_id = Self::get_machine_id().await?;