mirror of
https://github.com/qemu/qemu.git
synced 2024-12-18 09:43:38 +08:00
qdev-monitor-test: Don't test human-readable error message
Test the error class instead. Expecting a specific message is
fragile. In fact, it broke once already, in commit 75884af
. Restore
the test of error member "class" dropped there, and drop the test of
error member "desc".
There are no other tests of "desc" as far as I can tell.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
a3d7cbc139
commit
49649f23db
@ -32,9 +32,7 @@ static void test_device_add(void)
|
||||
"}}");
|
||||
g_assert(response);
|
||||
error = qdict_get_qdict(response, "error");
|
||||
g_assert_cmpstr(qdict_get_try_str(error, "desc"),
|
||||
==,
|
||||
"Device needs media, but drive is empty");
|
||||
g_assert_cmpstr(qdict_get_try_str(error, "class"), ==, "GenericError");
|
||||
QDECREF(response);
|
||||
|
||||
/* Delete the drive */
|
||||
|
Loading…
Reference in New Issue
Block a user