saschpe / libvirt-hook-qemu

Libvirt hook for setting up iptables port-forwarding rules when using NAT-ed networking.
234 stars 69 forks source link

add unit testing instructions to the readme #6

Closed bronson closed 8 years ago

bronson commented 8 years ago

Or, if this isn't correct, I'm happy to correct this PR.

Wasn't terribly easy for a mostly-non-python-dev to figure out.

saschpe commented 8 years ago

While this works, I probably would rather rename the 'qemu' binary to qemu.py in the project directory and do the symlinking in the Makefile's install target. I'm not quite sure if libvirt actually demands that. You may as well try just to put qemu.py there...

bronson commented 8 years ago

That makes total sense.

What do you think about this? Have the test import the non-py directly so no symlinking needed.

If this is no good then I'll modify the install script to rename qemu.py to qemu.

bronson commented 8 years ago

I verified that libvirt won't work with qemu.py. Not surprising but now it's certain:

error: Failed to start domain gitlab
error: Hook script execution failed: internal error: Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin /etc/libvirt/hooks/qemu gitlab prepare begin -) unexpected exit status 127: libvirt:  error : cannot execute binary /etc/libvirt/hooks/qemu: No such file or directory
saschpe commented 8 years ago

Please squash both commits into one, then it's good to go

bronson commented 8 years ago

agreed, done.