Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/tasks-admission/src/decide_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ fn devices_are_exclusive_and_skip_pressure_r035() {
let mut i = input(1, vec![]);
i.pressure.cpu = Some(100.0);
i.available_memory = 0;
let id = DeviceId("9BWAY1LSDC".into());
let id = DeviceId("PHONE00001".into());
i.devices.insert(
id.clone(),
DeviceState {
Expand All @@ -243,11 +243,11 @@ fn devices_are_exclusive_and_skip_pressure_r035() {
lane: Lane::Normal
}
);
assert_eq!(text(&v[&2]), "device 9BWAY1LSDC held by #1");
assert_eq!(text(&v[&2]), "device PHONE00001 held by #1");
i.devices.get_mut(&id).unwrap().free = false;
i.devices.get_mut(&id).unwrap().holder = Some(JobId(77));
i.waiters = vec![dev(3, 1)];
assert_eq!(text(&verdicts(&i)[&3]), "device 9BWAY1LSDC held by #77");
assert_eq!(text(&verdicts(&i)[&3]), "device PHONE00001 held by #77");
i.waiters = vec![waiter(4, SlotKind::Device, 1)];
assert_eq!(text(&verdicts(&i)[&4]), "device job names no device");
}
Expand Down
4 changes: 2 additions & 2 deletions crates/tasks-cli/src/args/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ fn r190_a_device_with_a_remote_placement_names_the_conflict_and_the_fix() {
peer: Some("nixos".into()),
..PlaceArgs::default()
};
let CliError::Usage(m) = p.placement(Some("9BWAY1LSDC")).unwrap_err() else {
let CliError::Usage(m) = p.placement(Some("PHONE00001")).unwrap_err() else {
panic!("usage expected")
};
assert!(
m.contains("--device 9BWAY1LSDC and --peer NAME conflict"),
m.contains("--device PHONE00001 and --peer NAME conflict"),
"{m}"
);
assert!(
Expand Down
6 changes: 3 additions & 3 deletions crates/tasks-cli/src/commands/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,11 +673,11 @@ fn a_device_job_carries_the_serial_and_the_device_kind() {
&[
"enqueue",
"--device",
"9BWAY1LSDC",
"PHONE00001",
"--",
"adb",
"-s",
"9BWAY1LSDC",
"PHONE00001",
"devices",
],
);
Expand All @@ -692,7 +692,7 @@ fn a_device_job_carries_the_serial_and_the_device_kind() {
assert_eq!(spec.kind, Kind::Device);
assert_eq!(
spec.requirements.device,
Some(DeviceId("9BWAY1LSDC".into()))
Some(DeviceId("PHONE00001".into()))
);
}

Expand Down
2 changes: 1 addition & 1 deletion crates/tasks-daemon/src/follow_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ fn r210_a_denied_serial_is_refused_in_argv_in_any_case_and_as_a_device_resource(
by_resource.requirements.device = Some(tasks_core::DeviceId("PHONE01X".into()));
assert_eq!(err(submit(&r, by_resource)).code, ErrorCode::Refused);
let mut fine = r.spec("o", &["adb", "devices"], Kind::Device);
fine.requirements.device = Some(tasks_core::DeviceId("9BWAY1LSDC".into()));
fine.requirements.device = Some(tasks_core::DeviceId("PHONE00001".into()));
assert!(matches!(ok(submit(&r, fine)), Response::Submitted { .. }));
}

Expand Down
4 changes: 2 additions & 2 deletions crates/tasks-mcp/tests/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ fn a_device_job_holds_a_device_slot() {
let r = call(
&tools_with(&d),
"submit",
json!({"argv": ["adb", "-s", "9BWAY1LSDC", "shell"], "device": "9BWAY1LSDC"}),
json!({"argv": ["adb", "-s", "PHONE00001", "shell"], "device": "PHONE00001"}),
);
assert!(!r.is_error, "{}", r.text);
let s = &submits(&d)[0];
assert_eq!(s.kind, Kind::Device);
assert_eq!(
s.requirements.device.as_ref().map(|d| d.0.as_str()),
Some("9BWAY1LSDC")
Some("PHONE00001")
);
}

Expand Down
Loading