Skip to content

Commit 9dca592

Browse files
committed
count only active ns
Signed-off-by: akihikokuroda <[email protected]>
1 parent fe101a6 commit 9dca592

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/e2e/csv_e2e_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"k8s.io/apimachinery/pkg/api/equality"
2020
k8serrors "k8s.io/apimachinery/pkg/api/errors"
2121
"k8s.io/apimachinery/pkg/api/meta"
22+
"k8s.io/apimachinery/pkg/fields"
2223
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2324
k8slabels "k8s.io/apimachinery/pkg/labels"
2425
"k8s.io/apimachinery/pkg/runtime"
@@ -4403,7 +4404,7 @@ var _ = Describe("Disabling copied CSVs", func() {
44034404
}
44044405

44054406
var namespaces corev1.NamespaceList
4406-
if err := ctx.Ctx().Client().List(context.TODO(), &namespaces, &client.ListOptions{}); err != nil {
4407+
if err := ctx.Ctx().Client().List(context.TODO(), &namespaces, &client.ListOptions{FieldSelector: fields.SelectorFromSet(map[string]string{"status.phase": "Active"})}); err != nil {
44074408
return err
44084409
}
44094410

0 commit comments

Comments
 (0)