From 8427b57f3ef2cd40459b27a92f480affa43a5bb4 Mon Sep 17 00:00:00 2001 From: ejc3 Date: Mon, 26 Oct 2026 06:42:40 +0000 Subject: [PATCH] Use the AWS documentation placeholder instance ids in fleet host fixtures Main's Bench Harness Tests failed test_no_tracked_file_anywhere_names_an_instance_volume_or_host (run 40278845876): the host driver fixtures in src/fleet/coord/hosts.rs and tests/test_fleet_coord.rs used made-up instance ids that match its pattern. They now use i-0123456789abcdef0 and i-1234567890abcdef0, the placeholders the check allows. Tests: the check fails on main and passes here; make test-unit over test_fleet_coord and fleet::coord::hosts passes (76 tests); make lint passes. --- src/fleet/coord/hosts.rs | 16 ++++++++-------- tests/test_fleet_coord.rs | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/fleet/coord/hosts.rs b/src/fleet/coord/hosts.rs index c1cf2ba1f..37c1aa5b0 100644 --- a/src/fleet/coord/hosts.rs +++ b/src/fleet/coord/hosts.rs @@ -1293,15 +1293,15 @@ mod tests { #[test] fn describe_answers_parse_to_hosts_with_their_market() { let xml = r#" - i-0000000000000000a16running + i-0123456789abcdef016running spotPurposefcvm-fleet-host - i-0000000000000000b0pending + i-1234567890abcdef00pending "#; assert_eq!( parse_hosts(xml), vec![ - host("i-0000000000000000a", "running", Market::Spot), - host("i-0000000000000000b", "pending", Market::OnDemand), + host("i-0123456789abcdef0", "running", Market::Spot), + host("i-1234567890abcdef0", "pending", Market::OnDemand), ] ); } @@ -1312,14 +1312,14 @@ mod tests { fn describe_answers_parse_by_item_whatever_the_field_order() { let xml = r#" 16runningspot - Purposefcvm-fleet-hosti-0000000000000000a - i-0000000000000000b0pending + Purposefcvm-fleet-hosti-0123456789abcdef0 + i-1234567890abcdef00pending "#; assert_eq!( parse_hosts(xml), vec![ - host("i-0000000000000000a", "running", Market::Spot), - host("i-0000000000000000b", "pending", Market::OnDemand), + host("i-0123456789abcdef0", "running", Market::Spot), + host("i-1234567890abcdef0", "pending", Market::OnDemand), ] ); } diff --git a/tests/test_fleet_coord.rs b/tests/test_fleet_coord.rs index 2b799333d..c4921ba3c 100644 --- a/tests/test_fleet_coord.rs +++ b/tests/test_fleet_coord.rs @@ -3424,7 +3424,7 @@ async fn fake_ec2_api(api: FakeEc2Api) -> String { if spot && !api.spot_capacity.contains(®ion) { return (StatusCode::OK, "fleet-0spotUnfulfillableCapacityUnable to fulfill capacity due to your request configuration.".into()); } - (StatusCode::OK, "fleet-1i-0fedcba9876543210".into()) + (StatusCode::OK, "fleet-1i-1234567890abcdef0".into()) } _ => error("InvalidAction"), } @@ -3475,7 +3475,7 @@ async fn the_aws_host_driver_launches_through_an_instant_fleet() { .launch("us-east-1", Market::OnDemand, 1, "token-od") .await .unwrap(); - assert_eq!(od.ids, vec!["i-0fedcba9876543210".to_string()]); + assert_eq!(od.ids, vec!["i-1234567890abcdef0".to_string()]); let calls = api.calls.lock().unwrap().clone(); // The template's type is read once and reused for the second launch. let reads: Vec<_> = calls