test: Fix pod cleanup after LRP test group
test: Fix pod cleanup after LRP test group

According to the Ginkgo e2e test docs, All "AfterEach" statements are
executed before all "AfterAll" statements[1].

Previously, this code was assuming that AfterAll inside a context would
run first (to delete pods) and then the AfterEach would run outside the
context (to wait for the pods to terminate), then AfterAll outside the
context to finally clean up the Cilium pods.

The result was that in issue 18447, the next test to run could
hit a race condition where pods were deleted but did not fully terminate
before Cilium was removed. Cilium ends up getting deleted before all the
pods, which means that there is no longer any way to execute the CNI DEL
operation for those pods, so they get stuck in Terminating state.

Fix it by moving the check that the test pods are fully terminated
before returning from the AfterAll statement where we initiate the
deletion of those pods.

[0]: https://docs.cilium.io/en/latest/contributing/testing/e2e/#example-test-layout

Signed-off-by: Joe Stringer <16a9a54ddf4259952e3c118c763138e83693d7fd@cilium.io>

cilium/cilium,cilium/cilium,michi-covalent/cilium,michi-covalent/cilium,michi-covalent/cilium,cilium/cilium,michi-covalent/cilium,cilium/cilium,michi-covalent/cilium,cilium/cilium