From 1194f09968b4cfb637bec6f2361c31abc6d9ffb8 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 6 Aug 2024 10:34:28 -0400 Subject: [PATCH] tests: cli: Fix with latest libvirt The libvirt test driver supports more APIs now, so we are getting a different error message. Extend the grep= string to work with both old and new libvirt Signed-off-by: Cole Robinson --- tests/test_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 6ca9a5851..7d77c1de7 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1377,7 +1377,7 @@ c.add_invalid("test --edit 2 --cpu host-passthrough", grep="'--edit 2' requested c.add_invalid("test-for-virtxml --edit 5 --tpm /dev/tpm", grep="'--edit 5' requested but there's only 1 --tpm object in the XML") c.add_invalid("test-for-virtxml --add-device --host-device 0x04b3:0x4485 --update --confirm", input_text="yes", grep="not supported") c.add_invalid("test-for-virtxml --remove-device --host-device 1 --update --confirm", input_text="foo\nyes\n", grep="not supported by the connection driver: virDomainDetachDevice") -c.add_invalid("test-for-virtxml --edit --graphics password=foo,keymap= --update --confirm", input_text="yes", grep="not supported by the connection driver: virDomainUpdateDeviceFlags") +c.add_invalid("test-for-virtxml --edit --graphics password=foo,keymap= --update --confirm", input_text="yes", grep="(not supported by the connection driver: virDomainUpdateDeviceFlags|persistent update of device 'graphics' is not supported)") c.add_invalid("--build-xml --memory 10,maxmemory=20", grep="--build-xml not supported for --memory") c.add_invalid("test-state-shutoff --edit sparse=no --disk path=blah", grep="Don't know how to match device type 'disk' property 'sparse'") c.add_invalid("test --add-device --xml ./@foo=bar", grep="--xml can only be used with --edit")