On 7/8/25 15:46, Christoph Heiss wrote:
> As for dummy_disk(), you could potentially make it a (static) method on
> the `Disk` type itself, gating it on `#[cfg(test)]`.
> 
> That would avoid some extra test utilities somewhere, while still having
> the benefit of being able to deduplicate it (even if trivial).
> We already use a similar pattern already in the setup code, see e.g.
> proxmox_installer_common::setup::ProductConfig::mocked()
> 
> dummy_disks() being a one-liner can of course be simply copied over.

Thanks for pointing me in the right direction. I like this approach,
will adapt for v4!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to