Skip to content

Commit d42d9e5

Browse files
committed
test: Extend test to assert rest-api container args
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
1 parent b0fc020 commit d42d9e5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

infra/feast-operator/internal/controller/featurestore_controller_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,29 @@ var _ = Describe("FeatureStore Controller", func() {
12561256
err = k8sClient.Get(ctx, nsName, resource)
12571257
Expect(err).NotTo(HaveOccurred())
12581258
Expect(resource.Status.Applied.Services.Registry.Local.Server.RestAPI).To(BeTrue())
1259+
By("checking the registry container args include --rest-api")
1260+
feast := services.FeastServices{
1261+
Handler: handler.FeastHandler{
1262+
Client: controllerReconciler.Client,
1263+
Context: ctx,
1264+
Scheme: controllerReconciler.Scheme,
1265+
FeatureStore: resource,
1266+
},
1267+
}
1268+
1269+
// check deployment
1270+
deploy := &appsv1.Deployment{}
1271+
objMeta := feast.GetObjectMeta()
1272+
err = k8sClient.Get(ctx, types.NamespacedName{
1273+
Name: objMeta.Name,
1274+
Namespace: objMeta.Namespace,
1275+
}, deploy)
1276+
Expect(err).NotTo(HaveOccurred())
1277+
1278+
registryContainer := services.GetRegistryContainer(*deploy)
1279+
Expect(registryContainer).NotTo(BeNil())
1280+
Expect(registryContainer.Command).To(ContainElement("--rest-api"),
1281+
"expected --rest-api to be present in registry container args: %v", registryContainer.Args)
12591282
})
12601283

12611284
It("should error on reconcile", func() {

0 commit comments

Comments
 (0)