CI - simulate hardware for testing

I would like to test some code that relies on the presence of hardware. Specifically, one or more S.M.A.R.T. capable harddrives that are interogated via smartmontools.
In the CI, the runners (obviously) have no harddisks attached.

What would be a good way to simulate the presence of a harddisk so that I could then test the software?

Are you running the runners in docker? in docker/Kubernetes you won’t be able to see any “native” machine features.

I’m using website-CI.
I accept that I won’t be able to see actual hardware on /proc or /dev.

I’m wondering if someone knows how to simulate the presence of real hardware in the given virtual environment of the runner, so I can test my software before deployment onto actual bare metal.

All the ways I’m familiar with involve kernel stubs or fakes, or representing the same with fault injection tools in the kernel itself. Also the sort of space that would be darned awkward to replicate in a container. You can see some details in this StackOverflow Q&A:

There might some possibilities with a classic hypervisor (KVM, Xen, QEMU) - which could run in user space, but in any of these cases you’ll need to be writing code to emulate the low level hardware interfaces (so expect poor documentation, if any, and a fair bit of low-level C code needed).