@@ -19,6 +19,7 @@ import (
19
19
"k8s.io/apimachinery/pkg/api/equality"
20
20
k8serrors "k8s.io/apimachinery/pkg/api/errors"
21
21
"k8s.io/apimachinery/pkg/api/meta"
22
+ "k8s.io/apimachinery/pkg/fields"
22
23
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
23
24
k8slabels "k8s.io/apimachinery/pkg/labels"
24
25
"k8s.io/apimachinery/pkg/runtime"
@@ -4247,6 +4248,10 @@ var _ = Describe("Disabling copied CSVs", func() {
4247
4248
return nil
4248
4249
}).Should (Succeed ())
4249
4250
TeardownNamespace (ns .GetName ())
4251
+ Eventually (func () error {
4252
+ var namespace corev1.Namespace
4253
+ return ctx .Ctx ().Client ().Get (context .Background (), client .ObjectKeyFromObject (& ns ), & namespace )
4254
+ }).Should (WithTransform (k8serrors .IsNotFound , BeTrue ()))
4250
4255
})
4251
4256
4252
4257
When ("an operator is installed in AllNamespace mode" , func () {
@@ -4403,7 +4408,7 @@ var _ = Describe("Disabling copied CSVs", func() {
4403
4408
}
4404
4409
4405
4410
var namespaces corev1.NamespaceList
4406
- if err := ctx .Ctx ().Client ().List (context .TODO (), & namespaces , & client.ListOptions {}); err != nil {
4411
+ if err := ctx .Ctx ().Client ().List (context .TODO (), & namespaces , & client.ListOptions {FieldSelector : fields . SelectorFromSet ( map [ string ] string { "status.phase" : "Active" }) }); err != nil {
4407
4412
return err
4408
4413
}
4409
4414
0 commit comments