mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
tests: qemuxml2argv: Validate generation of JSON props for object-add
Similarly to the validation for blockdev-add and netdev_add, use the qemuxml2argv test repository to drive validation of props for object-add. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
4f33b817b2
commit
7dea29431e
@ -603,6 +603,24 @@ testCompareXMLToArgvValidateSchema(virQEMUDriverPtr drv,
|
||||
return -1;
|
||||
}
|
||||
|
||||
i++;
|
||||
} else if (STREQ(args[i], "-object")) {
|
||||
|
||||
if (*args[i + 1] != '{') {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!(jsonargs = virJSONValueFromString(args[i + 1])))
|
||||
return -1;
|
||||
|
||||
if (testQEMUSchemaValidateCommand("object-add", jsonargs,
|
||||
schema, false, false, &debug) < 0) {
|
||||
VIR_TEST_VERBOSE("failed to validate -object '%s' against QAPI schema: %s",
|
||||
args[i + 1], virBufferCurrentContent(&debug));
|
||||
return -1;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user