Flaky functest - [test_id:1779] fixing race in the Expecter
Flaky functest - [test_id:1779] fixing race in the Expecter

Having multiple `expect.BExp` one after the other without an `expect.BSnd`
between them is raceful.

`expect.BExp` is waiting for the desired expression in the current buffer
and flushes the buffer once the expression is found.

For example -
&expect.BSnd{S: "a\nb"},
&expect.BExp{R: "a"},
&expect.BExp{R: "b"}

In the good scenario we will get -
Sent: "a\nb"
Match for RE: "a" found: ["a"] Buffer:
$a
Match for RE: "b" found: ["b"] Buffer:
b

In the bad scenario we will get -
Sent: "a\nb"
Match for RE: "a" found: ["a"] Buffer:
$a
b

The second match (looking for 'b') will never be met since 'b' was already
in the buffer when the first match was found, therefore it was flushed by
the first `expect.BExp`.

To avoid this we need to make sure the `expect.BExp` is only expecting text
that was added to the buffer after the previous expectation was met.

Signed-off-by: Alona Kaplan <9ea2f88c7fe7e68aa51858b03e0d548211901b83@redhat.com>

stu-gott/kubevirt,stu-gott/kubevirt,kubevirt/kubevirt,stu-gott/kubevirt,kubevirt/kubevirt,kubevirt/kubevirt,stu-gott/kubevirt,davidvossel/kubevirt,kubevirt/kubevirt,davidvossel/kubevirt,davidvossel/kubevirt,davidvossel/kubevirt