diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2023-06-01 17:13:40 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-06-02 11:46:19 +0200 |
commit | ffd47275895633f2f21aa5f86ab184776b5ea9d1 (patch) | |
tree | 0d2db284a77f14a050acd76f1788d017fe4db56d /tests/qtest/migration-helpers.c | |
parent | 0150e75d012b34182fa1951d346377f8196464e4 (diff) |
tests/qtest: get rid of 'qmp_command' helper in migration test
This function duplicates logic of qtest_qmp_assert_success_ref.
The qtest_qmp_assert_success_ref method has better diagnostics
on failure because it prints the entire QMP response, instead
of just asserting on existance of the 'error' key.
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230601161347.1803440-4-berrange@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'tests/qtest/migration-helpers.c')
-rw-r--r-- | tests/qtest/migration-helpers.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/qtest/migration-helpers.c b/tests/qtest/migration-helpers.c index f6f3c6680f..bddf3f8d4d 100644 --- a/tests/qtest/migration-helpers.c +++ b/tests/qtest/migration-helpers.c @@ -86,28 +86,6 @@ QDict *wait_command(QTestState *who, const char *command, ...) } /* - * Execute the qmp command only - */ -QDict *qmp_command(QTestState *who, const char *command, ...) -{ - va_list ap; - QDict *resp, *ret; - - va_start(ap, command); - resp = qtest_vqmp(who, command, ap); - va_end(ap); - - g_assert(!qdict_haskey(resp, "error")); - g_assert(qdict_haskey(resp, "return")); - - ret = qdict_get_qdict(resp, "return"); - qobject_ref(ret); - qobject_unref(resp); - - return ret; -} - -/* * Send QMP command "migrate". * Arguments are built from @fmt... (formatted like * qobject_from_jsonf_nofail()) with "uri": @uri spliced in. |