qemu will exit on wrongly passed options (e..g port is already in use, or passing string except of port number, passing invalid certificate). This can be identified by VMCreateError
test fill fail in case that:
qemu succeeds to create()
Problems: I'm not sure if VMCreateError will bubble so high that you'll be able to catch it in your test. So if it doesn't than you need to modify code or use different creation method so it will be catchable from within your test
We need to write following test:
test will succeed in case that:
qemu will exit on wrongly passed options (e..g port is already in use, or passing string except of port number, passing invalid certificate). This can be identified by VMCreateError
test fill fail in case that: qemu succeeds to create()
Problems: I'm not sure if VMCreateError will bubble so high that you'll be able to catch it in your test. So if it doesn't than you need to modify code or use different creation method so it will be catchable from within your test