Use the singleton pattern for the VM class.
I.e. there will only be one instance per test suite run. Furthermore, if the expected domain (based on name ("TailsToaster")) already exists, it will be "restored" upon object initialization, instead of creating a new one (which it will do if none exists already, of course). We've been a bit crazy about destroying and undefining domain between each scenario until now. It's enough to just reset the domain to the default state. This will allow us to drop the static Libvirt domain UUID and, relatedly, also bring a bit more sense into the --keep-snapshots option by making it *not* undefine the domain on exit. After all, the snapshots we want to persist belong to that domain, so it should still exist.
Loading
Please register or sign in to comment