tests: Wait until console handler is done before checking mocks
tests: Wait until console handler is done before checking mocks

In the virt-handler unit tests, the httptest server sometimes reports
already that the server is done, before the handler method call is done.
This leads to flaky checks on the expected mocked out calls. Therefore,
make sure that the http handler is done, by explicitly waiting for a
channel, which signals that.

This fixes temporary test errors like

  missing call(s) to *virtwrap.MockVirDomain.Free()

Signed-off-by: Roman Mohr <6da0130c5aeef94e5bbaabadbf8017270be25c64@redhat.com>

stu-gott/kubevirt,kubevirt/kubevirt,kubevirt/kubevirt,stu-gott/kubevirt,rmohr/kubevirt,kubevirt/kubevirt,admiyo/kubevirt,mpolednik/kubevirt,fabiand/kubevirt,mpolednik/kubevirt,kubevirt/kubevirt,stu-gott/kubevirt,davidvossel/kubevirt,stu-gott/kubevirt,davidvossel/kubevirt,rmohr/kubevirt,davidvossel/kubevirt,fabiand/kubevirt,davidvossel/kubevirt,admiyo/kubevirt