sbctl
sbctl copied to clipboard
Integration tests
Look into https://github.com/anatol/vmtest for integration tests. I'm a bit unsure if unit-testing works well as we are relying on firmware stuff.
Here is a good example how to test a command-line tool that requires root
+ some complex testing environment (special kernel, kernel modules, user tools, etc...)
https://github.com/anatol/luks.go/blob/master/integration_test.go to run kernel + special image inside QEMU
https://github.com/anatol/luks.go/blob/master/examples/end2end_test.go a test that needs to be run as root
This has now been partially implemented https://github.com/Foxboron/sbctl/tree/master/tests