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 be6092e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/agent/onefuzz-agent/src/agent.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

#![allow(clippy::too_many_arguments)]
use anyhow::{Error, Result};
use tokio::time;

Expand Down
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
4 changes: 2 additions & 2 deletions src/agent/onefuzz/examples/test-input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use std::path::PathBuf;

use anyhow::Result;
use onefuzz::input_tester::Tester;
use onefuzz::{input_tester::Tester, machine_id::MachineIdentity};
use structopt::StructOpt;

#[derive(Debug, PartialEq, Eq, StructOpt)]
Expand Down Expand Up @@ -53,7 +53,7 @@ async fn main() -> Result<()> {
}

let env = Default::default();
let tester = Tester::new(&setup_dir, &opt.exe, &target_options, &env);
let tester = Tester::new(&setup_dir, &opt.exe, &target_options, &env, MachineIdentity::default());

let check_debugger = !opt.no_check_debugger;
let tester = tester
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 be6092e

Please sign in to comment.