]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: qemuargv2xml: hardcode disk auth usage
authorCole Robinson <crobinso@redhat.com>
Tue, 16 Feb 2016 16:49:07 +0000 (11:49 -0500)
committerCole Robinson <crobinso@redhat.com>
Wed, 17 Feb 2016 16:07:21 +0000 (11:07 -0500)
commit73ed1d7401183a868e1a3d8dcd1bda82f5e017cd
tree5d279bb13a125e382149e18f4c11643420f2b543
parentb25027ba5da6734603d9b78aaf44ac3aa4a02fe0
tests: qemuargv2xml: hardcode disk auth usage

If a qemuargv has iscsi or ceph secrets on the command line, we will
convert that to XML like:

  <auth username='myname'>
    <secret type='iscsi'/>
  </auth>

This is not valid XML, as either a UUID or usage must be specified in
the secret block. It's not clear though how the argv2xml code can do
anything correct here, since XML like this requires a libvirt secret
object to have already been defined.

The current test suite handles this by blanking out any <secret> block
in the XML. This avoids domainschematest failures.

Instead of blanking, let's hardcode a usage= name. This lets us test
the other bits of generated <secret> XML, and is a step towards wiring
up VIR_TEST_REGENERATE_OUTPUT
tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-iscsi-auth.xml
tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
tests/qemuargv2xmltest.c