tests: Add CLI <-> API validation test for --net changes

Check that the CLI generates the JSON data as expected.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2020-01-28 10:38:42 +00:00
parent 8f096b8be5
commit 4888dd2e01

View File

@ -839,6 +839,15 @@ mod unit_tests {
}"#,
true,
),
(
vec!["cloud-hypervisor", "--net", "mac=12:34:56:78:90:ab,vhost_user=true,socket=/tmp/socket"],
r#"{
"net": [
{"mac": "12:34:56:78:90:ab", "vhost_user": true, "vhost_socket": "/tmp/socket"}
]
}"#,
true,
),
]
.iter()
.for_each(|(cli, openapi, equal)| {