diff --git a/controllers/operands/operandHandler.go b/controllers/operands/operandHandler.go index 0d9c052b3f..09f1a55b95 100644 --- a/controllers/operands/operandHandler.go +++ b/controllers/operands/operandHandler.go @@ -194,6 +194,7 @@ func (h *OperandHandler) EnsureDeleted(req *common.HcoRequest) error { NewNetworkAddonsWithNameOnly(req.Instance), NewSSPWithNameOnly(req.Instance), NewConsoleCLIDownload(req.Instance), + NewMTQWithNameOnly(req.Instance), } resources = append(resources, h.objects...) diff --git a/tests/func-tests/mtq_test.go b/tests/func-tests/mtq_test.go index bc892e3dc9..f4fd892176 100644 --- a/tests/func-tests/mtq_test.go +++ b/tests/func-tests/mtq_test.go @@ -8,6 +8,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" conditionsv1 "github.com/openshift/custom-resource-status/conditions/v1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -61,9 +62,13 @@ var _ = Describe("Test MTQ", Label("MTQ"), Serial, Ordered, func() { }).WithTimeout(5 * time.Minute).WithPolling(time.Second).ShouldNot(BeTrue()) By("check MTQ pods") - pods, err := cli.CoreV1().Pods(flags.KubeVirtInstallNamespace).List(ctx, metav1.ListOptions{LabelSelector: "app.kubernetes.io/component=multi-tenant"}) - Expect(err).ShouldNot(HaveOccurred()) - Expect(pods.Items).Should(HaveLen(3)) + Eventually(func(g Gomega) []corev1.Pod { + pods, err := cli.CoreV1().Pods(flags.KubeVirtInstallNamespace).List(ctx, metav1.ListOptions{LabelSelector: "app.kubernetes.io/component=multi-tenant"}) + g.Expect(err).ShouldNot(HaveOccurred()) + return pods.Items + }).WithTimeout(5 * time.Minute). + WithPolling(time.Second). + Should(HaveLen(3)) }) }) })