@@ -154,6 +154,34 @@ func TestPrepareFirstEventBatchPreparerArgs(t *testing.T) {
154154 & ngfAPIv1alpha1.UpstreamSettingsPolicyList {},
155155 },
156156 },
157+ {
158+ name : "snippets policies enabled" ,
159+ cfg : config.Config {
160+ GatewayClassName : gcName ,
161+ SnippetsPolicies : true ,
162+ },
163+ expectedObjects : []client.Object {
164+ & gatewayv1.GatewayClass {ObjectMeta : metav1.ObjectMeta {Name : "nginx" }},
165+ },
166+ expectedObjectLists : []client.ObjectList {
167+ & apiv1.ServiceList {},
168+ & apiv1.SecretList {},
169+ & apiv1.NamespaceList {},
170+ & discoveryV1.EndpointSliceList {},
171+ & gatewayv1.HTTPRouteList {},
172+ & gatewayv1.BackendTLSPolicyList {},
173+ & apiv1.ConfigMapList {},
174+ & gatewayv1.GatewayList {},
175+ & gatewayv1beta1.ReferenceGrantList {},
176+ & ngfAPIv1alpha2.NginxProxyList {},
177+ partialObjectMetadataList ,
178+ & gatewayv1.GRPCRouteList {},
179+ & ngfAPIv1alpha1.ClientSettingsPolicyList {},
180+ & ngfAPIv1alpha2.ObservabilityPolicyList {},
181+ & ngfAPIv1alpha1.SnippetsPolicyList {},
182+ & ngfAPIv1alpha1.UpstreamSettingsPolicyList {},
183+ },
184+ },
157185 {
158186 name : "experimental, inference, and snippets filters enabled" ,
159187 cfg : config.Config {
@@ -186,6 +214,40 @@ func TestPrepareFirstEventBatchPreparerArgs(t *testing.T) {
186214 & ngfAPIv1alpha1.UpstreamSettingsPolicyList {},
187215 },
188216 },
217+ {
218+ name : "all features enabled" ,
219+ cfg : config.Config {
220+ GatewayClassName : gcName ,
221+ ExperimentalFeatures : true ,
222+ InferenceExtension : true ,
223+ SnippetsFilters : true ,
224+ SnippetsPolicies : true ,
225+ },
226+ expectedObjects : []client.Object {
227+ & gatewayv1.GatewayClass {ObjectMeta : metav1.ObjectMeta {Name : "nginx" }},
228+ },
229+ expectedObjectLists : []client.ObjectList {
230+ & apiv1.ServiceList {},
231+ & apiv1.SecretList {},
232+ & apiv1.NamespaceList {},
233+ & apiv1.ConfigMapList {},
234+ & discoveryV1.EndpointSliceList {},
235+ & gatewayv1.HTTPRouteList {},
236+ & gatewayv1.GatewayList {},
237+ & gatewayv1beta1.ReferenceGrantList {},
238+ & ngfAPIv1alpha2.NginxProxyList {},
239+ partialObjectMetadataList ,
240+ & inference.InferencePoolList {},
241+ & gatewayv1.BackendTLSPolicyList {},
242+ & gatewayv1alpha2.TLSRouteList {},
243+ & gatewayv1.GRPCRouteList {},
244+ & ngfAPIv1alpha1.ClientSettingsPolicyList {},
245+ & ngfAPIv1alpha2.ObservabilityPolicyList {},
246+ & ngfAPIv1alpha1.SnippetsFilterList {},
247+ & ngfAPIv1alpha1.SnippetsPolicyList {},
248+ & ngfAPIv1alpha1.UpstreamSettingsPolicyList {},
249+ },
250+ },
189251 }
190252
191253 for _ , test := range tests {
0 commit comments