mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-07 01:47:47 +08:00
fix(gateway): buffer admin pool batch update bodies
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
use http::Uri;
|
||||
|
||||
use super::{classify_control_route, headers};
|
||||
use crate::control::GatewayPublicRequestContext;
|
||||
use crate::handlers::shared::local_proxy_route_requires_buffered_body;
|
||||
|
||||
#[test]
|
||||
fn classifies_admin_pool_overview_as_admin_proxy_route() {
|
||||
@@ -92,6 +94,16 @@ fn classifies_admin_pool_provider_key_routes_as_admin_proxy_route() {
|
||||
batch_update.route_kind.as_deref(),
|
||||
Some("batch_update_keys")
|
||||
);
|
||||
let batch_update_context = GatewayPublicRequestContext::from_request_parts(
|
||||
"trace-admin-pool-batch-update",
|
||||
&http::Method::PATCH,
|
||||
&batch_update_uri,
|
||||
&headers,
|
||||
Some(batch_update),
|
||||
);
|
||||
assert!(local_proxy_route_requires_buffered_body(
|
||||
&batch_update_context
|
||||
));
|
||||
|
||||
let resolve_selection_uri: Uri = "/api/admin/pool/provider-1/keys/resolve-selection"
|
||||
.parse()
|
||||
|
||||
Reference in New Issue
Block a user