@@ -72,7 +72,8 @@ async fn http_gateway_migration_single_node_query() {
7272 ttl_ms : 0 ,
7373 surrogate : nodedb_types:: Surrogate :: ZERO ,
7474 } ) ;
75- let put_result = gateway. execute ( & ctx, put_plan) . await ;
75+ let put_authorized = common:: authorize_gateway_plan ( & node. shared , & ctx, put_plan) ;
76+ let put_result = gateway. execute ( & ctx, put_authorized) . await ;
7677 assert ! (
7778 put_result. is_ok( ) ,
7879 "PUT via gateway failed: {:?}" ,
@@ -86,7 +87,8 @@ async fn http_gateway_migration_single_node_query() {
8687 rls_filters : vec ! [ ] ,
8788 surrogate_ceiling : None ,
8889 } ) ;
89- let get_result = gateway. execute ( & ctx, get_plan) . await ;
90+ let get_authorized = common:: authorize_gateway_plan ( & node. shared , & ctx, get_plan) ;
91+ let get_result = gateway. execute ( & ctx, get_authorized) . await ;
9092 assert ! (
9193 get_result. is_ok( ) ,
9294 "GET via gateway failed: {:?}" ,
@@ -141,7 +143,8 @@ async fn http_gateway_migration_cross_node_query() {
141143 ttl_ms : 0 ,
142144 surrogate : nodedb_types:: Surrogate :: ZERO ,
143145 } ) ;
144- let put_result = gateway. execute ( & ctx, put_plan) . await ;
146+ let put_authorized = common:: authorize_gateway_plan ( & follower. shared , & ctx, put_plan) ;
147+ let put_result = gateway. execute ( & ctx, put_authorized) . await ;
145148 assert ! (
146149 put_result. is_ok( ) ,
147150 "cross-node PUT via gateway failed: {:?}" ,
@@ -162,14 +165,26 @@ async fn http_gateway_migration_cross_node_query() {
162165
163166 for i in 0 ..3u32 {
164167 let result = gateway
165- . execute_sql ( & ctx, get_sql, & [ ] , || {
166- Ok ( PhysicalPlan :: Kv ( KvOp :: Get {
167- collection : "http_gw_cross_node" . into ( ) ,
168- key : b"cross-key" . to_vec ( ) ,
169- rls_filters : vec ! [ ] ,
170- surrogate_ceiling : None ,
171- } ) )
172- } )
168+ . execute_sql (
169+ & ctx,
170+ get_sql,
171+ & [ ] ,
172+ || {
173+ Ok ( PhysicalPlan :: Kv ( KvOp :: Get {
174+ collection : "http_gw_cross_node" . into ( ) ,
175+ key : b"cross-key" . to_vec ( ) ,
176+ rls_filters : vec ! [ ] ,
177+ surrogate_ceiling : None ,
178+ } ) )
179+ } ,
180+ |plan| {
181+ Ok ( common:: authorize_gateway_plan (
182+ & follower. shared ,
183+ & ctx,
184+ plan. clone ( ) ,
185+ ) )
186+ } ,
187+ )
173188 . await ;
174189 assert ! (
175190 result. is_ok( ) ,
0 commit comments