Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Commit

Permalink
build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chkeita committed Nov 22, 2022
1 parent 9d1dbb3 commit 07f8ad6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/agent/onefuzz-agent/src/agent/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ impl Fixture {
work_queue,
worker_runner,
None,
true,
)
}

Expand Down
9 changes: 4 additions & 5 deletions src/agent/onefuzz/src/expand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
2 changes: 2 additions & 0 deletions src/agent/onefuzz/src/libfuzzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ mod tests {
options.clone(),
env.clone(),
&temp_setup_dir.path(),
MachineIdentity::default(),
);

// verify catching bad exits with -help=1
Expand Down Expand Up @@ -473,6 +474,7 @@ mod tests {
options.clone(),
env.clone(),
&temp_setup_dir.path(),
MachineIdentity::default(),
);
// verify good exits with -help=1
assert!(
Expand Down
3 changes: 0 additions & 3 deletions src/agent/onefuzz/src/machine_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self> {
let machine_id = Self::get_machine_id().await?;
Expand Down

0 comments on commit 07f8ad6

Please sign in to comment.