@@ -507,18 +507,19 @@ func (s *GatewayOpsTestSuite) TestUpdateIndex() {
507507 resourceDetails : "searchindex" ,
508508 expect : codes .InvalidArgument ,
509509 },
510- // TODO - ING-1155
511- // {
512- // description: "PlanParams",
513- // modifyDefault: func(def *admin_search_v1.UpdateIndexRequest) *admin_search_v1.UpdateIndexRequest {
514- // def.Index.PlanParams = map[string][]byte{
515- // "targets": b,
516- // }
510+ {
511+ description : "PlanParams" ,
512+ modifyDefault : func (def * admin_search_v1.UpdateIndexRequest ) * admin_search_v1.UpdateIndexRequest {
513+ b , err := json .Marshal (987 )
514+ s .Require ().NoError (err )
515+ def .Index .PlanParams = map [string ][]byte {
516+ "maxPartitionsPerPIndex" : b ,
517+ }
517518
518- // return def
519- // },
520- // expect: codes.OK,
521- // },
519+ return def
520+ },
521+ expect : codes .OK ,
522+ },
522523 {
523524 description : "InvalidType" ,
524525 modifyDefault : func (def * admin_search_v1.UpdateIndexRequest ) * admin_search_v1.UpdateIndexRequest {
@@ -606,7 +607,10 @@ func (s *GatewayOpsTestSuite) TestUpdateIndex() {
606607 requireRpcSuccess (s .T (), getResp , err )
607608
608609 assert .Equal (s .T (), req .Index .SourceParams , updatedGetResp .Index .SourceParams )
609- assert .Equal (s .T (), req .Index .PlanParams , updatedGetResp .Index .PlanParams )
610+ // Different server versions return different fields in plan
611+ // params that would cause a general Equal to fail so we only
612+ // check maxPartitionsPerPIndex
613+ assert .Equal (s .T (), req .Index .PlanParams ["maxPartitionsPerPIndex" ], updatedGetResp .Index .PlanParams ["maxPartitionsPerPIndex" ])
610614 assert .Equal (s .T (), req .Index .SourceName , updatedGetResp .Index .SourceName )
611615 assert .Equal (s .T (), req .Index .SourceType , updatedGetResp .Index .SourceType )
612616 assert .Equal (s .T (), req .Index .SourceUuid , updatedGetResp .Index .SourceUuid )
0 commit comments