提交 49649f23 编写于 作者: M Markus Armbruster 提交者: Andreas Färber

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 75884afd.  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: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 a3d7cbc1
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册