Harvester Testing
This path contains the basic testing framework and integration testing cases, the primary focus in here to covering all Harvester APIs with integration testing cases.
Integration test
The integration test is performed on every pull request and is run by the Drone CI. The script is stored in the scripts/test-integration
file.
Before the integration test, you must check the AppArmor status to ensure the usr.sbin.virtqemud
is not enabled.
Or you might see the following error in virt-launcher pods when you test the VM API
compute {"component":"virt-launcher","kind":"","level":"error","msg":"Failed to sync vmi","name":"test-grsvz","namespace":"default","pos":"server.go:202","reason":"virError(Code=1, Domain=10, Message='internal error: Failed to start QEMU binary /usr/bin/qemu-system-x86_64 for probing: libvirt: error : cannot execute binary /usr/bin/qemu-system-x86_64: Operation not permitted\n')","timestamp":"2024-06-26T07:46:15.346012Z","uid":"e4ec1043-d9ce-4246-b672-f554e9a00169"}
You can use the following command to check:
$ sudo aa-status |grep virtqemud
And use the following command to disable:
$ sudo aa-disable /etc/apparmor.d/usr.sbin.virtqemud
How to run