diff --git a/sled-agent/src/instance_manager.rs b/sled-agent/src/instance_manager.rs index 2c9780b3ce..cf6563b117 100644 --- a/sled-agent/src/instance_manager.rs +++ b/sled-agent/src/instance_manager.rs @@ -750,7 +750,7 @@ impl InstanceTicket { InstanceTicket { id, terminate_tx: Some(terminate_tx) } } - #[cfg(test)] + #[cfg(all(test, target_os = "illumos"))] pub(crate) fn new_without_manager_for_test(id: Uuid) -> Self { Self { id, terminate_tx: None } } diff --git a/sled-agent/src/vmm_reservoir.rs b/sled-agent/src/vmm_reservoir.rs index d4cadcc3ec..caa1d88254 100644 --- a/sled-agent/src/vmm_reservoir.rs +++ b/sled-agent/src/vmm_reservoir.rs @@ -121,7 +121,7 @@ impl VmmReservoirManagerHandle { } /// TODO: We should be able run to tests in VMs that can use the real VmmReservoir - #[cfg(test)] + #[cfg(all(test, target_os = "illumos"))] pub fn stub_for_test() -> Self { let (tx, _) = flume::bounded(1); let (size_updated_tx, _) = broadcast::channel(1);