
On 04/25/2018 11:15 AM, Peter Krempa wrote:
Apart from adding test data add a function which sets up fake secrets for the test.
The top level disk image would generate the following '-drive' cmdline:
-drive file=/path/luks.img,key-secret=test1-encalias,format=luks,if=none,id=drive-dummy -device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- tests/qemublocktest.c | 42 ++++++++++++++++++++++ .../qemublocktestdata/xml2json/file-raw-luks.json | 13 +++++++ tests/qemublocktestdata/xml2json/file-raw-luks.xml | 15 ++++++++ 3 files changed, 70 insertions(+) create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.json create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.xml
Later on auth gets tested, so that's fine. Unless you want to make a "simple" auth test to partner with this simple luks encryption one. Reviewed-by: John Ferlan <jferlan@redhat.com> John