Skip to content

Commit 2a10abb

Browse files
authored
auth controller test flake (#911)
rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED Signed-off-by: craig <[email protected]>
1 parent 7e0aefb commit 2a10abb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/common/authpolicy/authpolicy_controller_test.go

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
. "github.com/onsi/ginkgo/v2"
1313
. "github.com/onsi/gomega"
1414

15+
authorinov1beta1 "github.com/kuadrant/authorino-operator/api/v1beta1"
1516
authorinoapi "github.com/kuadrant/authorino/api/v1beta2"
1617
apierrors "k8s.io/apimachinery/pkg/api/errors"
1718
"k8s.io/apimachinery/pkg/api/meta"
@@ -125,6 +126,13 @@ var _ = Describe("AuthPolicy controller (Serial)", Serial, func() {
125126
defer tests.ApplyKuadrantCR(ctx, testClient(), kuadrantInstallationNS)
126127
tests.DeleteKuadrantCR(ctx, testClient(), kuadrantInstallationNS)
127128

129+
Eventually(func(g Gomega) {
130+
authorinos := &authorinov1beta1.AuthorinoList{}
131+
err := testClient().List(ctx, authorinos, &client.ListOptions{Namespace: kuadrantInstallationNS})
132+
g.Expect(err).ToNot(HaveOccurred())
133+
g.Expect(len(authorinos.Items)).To(Equal(0))
134+
}).Should(Succeed())
135+
128136
policy := policyFactory()
129137

130138
err := k8sClient.Create(ctx, policy)

0 commit comments

Comments
 (0)