@@ -103,11 +103,13 @@ var _ = SIGDescribe("API Streaming (aka. WatchList)", framework.WithFeatureGate(
103103 f .Namespace .Name ,
104104 time .Duration (0 ),
105105 nil ,
106- nil ,
106+ func (options * metav1.ListOptions ) {
107+ options .LabelSelector = "watchlist=true"
108+ },
107109 )
108110
109111 _ = addWellKnownSecrets (ctx , f )
110- expectedSecrets , err := metadataClient .Resource (v1 .SchemeGroupVersion .WithResource ("secrets" )).Namespace (f .Namespace .Name ).List (ctx , metav1.ListOptions {})
112+ expectedSecrets , err := metadataClient .Resource (v1 .SchemeGroupVersion .WithResource ("secrets" )).Namespace (f .Namespace .Name ).List (ctx , metav1.ListOptions {LabelSelector : "watchlist=true" })
111113 framework .ExpectNoError (err )
112114
113115 ginkgo .By ("Starting the secret meta informer" )
@@ -131,7 +133,7 @@ var _ = SIGDescribe("API Streaming (aka. WatchList)", framework.WithFeatureGate(
131133 _ , err = f .ClientSet .CoreV1 ().Secrets (f .Namespace .Name ).Update (ctx , secret , metav1.UpdateOptions {})
132134 framework .ExpectNoError (err )
133135
134- expectedSecrets , err = metadataClient .Resource (v1 .SchemeGroupVersion .WithResource ("secrets" )).Namespace (f .Namespace .Name ).List (ctx , metav1.ListOptions {})
136+ expectedSecrets , err = metadataClient .Resource (v1 .SchemeGroupVersion .WithResource ("secrets" )).Namespace (f .Namespace .Name ).List (ctx , metav1.ListOptions {LabelSelector : "watchlist=true" })
135137 framework .ExpectNoError (err )
136138 verifyStoreFor (ctx , verifyPartialObjectMetadataStore (toPointerSlice (expectedSecrets .Items ), secretMetaInformer .Informer ().GetStore ()))
137139 })
0 commit comments