Skip to content

Commit c9d6ae6

Browse files
committed
fix(e2e): only select installplans owned by subscriptions
1 parent a523aa8 commit c9d6ae6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test/e2e/catalog_e2e_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"github.com/operator-framework/operator-lifecycle-manager/pkg/api/apis/operators/v1alpha1"
2121
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry"
2222
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient"
23+
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/ownerutil"
2324
)
2425

2526
func TestCatalogLoadingBetweenRestarts(t *testing.T) {
@@ -222,8 +223,14 @@ func TestConfigMapUpdateTriggersRegistryPodRollout(t *testing.T) {
222223
require.NoError(t, err)
223224

224225
ipList, err := crc.OperatorsV1alpha1().InstallPlans(testNamespace).List(metav1.ListOptions{})
226+
ipCount := 0
227+
for _, ip := range ipList.Items {
228+
if ownerutil.IsOwnedBy(&ip, subscription) {
229+
ipCount += 1
230+
}
231+
}
225232
require.NoError(t, err)
226-
require.Equal(t, 1, len(ipList.Items))
233+
require.Equal(t, 1, ipCount)
227234
}
228235

229236
func TestConfigMapReplaceTriggersRegistryPodRollout(t *testing.T) {

0 commit comments

Comments
 (0)