mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-08 12:10:19 +08:00
test(gateway): align local execution fixtures with routing
This commit is contained in:
@@ -897,34 +897,6 @@ impl GatewayDataState {
|
||||
self
|
||||
}
|
||||
|
||||
/// Attach the minimal enabled system-default strategy needed by request
|
||||
/// execution tests. Production startup creates this row during database
|
||||
/// bootstrap; isolated test data states bypass that startup path.
|
||||
#[cfg(test)]
|
||||
pub(crate) fn with_default_routing_group_for_tests(self) -> Self {
|
||||
use aether_data::repository::routing_profiles::InMemoryRoutingGroupRepository;
|
||||
use aether_data_contracts::repository::routing_profiles::StoredRoutingGroup;
|
||||
|
||||
let repository = Arc::new(InMemoryRoutingGroupRepository::seed(
|
||||
vec![StoredRoutingGroup {
|
||||
id: "test-system-default".to_string(),
|
||||
name: "test-system-default".to_string(),
|
||||
description: None,
|
||||
enabled: true,
|
||||
is_system_default: true,
|
||||
sort_order: 0,
|
||||
config_json: serde_json::json!({}),
|
||||
version: 1,
|
||||
created_at: 1,
|
||||
updated_at: 1,
|
||||
published_at: None,
|
||||
}],
|
||||
Vec::new(),
|
||||
Vec::new(),
|
||||
));
|
||||
self.with_routing_group_repository_for_tests(repository)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn with_system_default_routing_group_for_tests(self) -> Self {
|
||||
let now = 1;
|
||||
|
||||
@@ -27,7 +27,7 @@ impl AppState {
|
||||
&& !data_state.has_routing_group_reader()
|
||||
&& !data_state.has_routing_group_writer()
|
||||
{
|
||||
data_state.with_default_routing_group_for_tests()
|
||||
data_state.with_system_default_routing_group_for_tests()
|
||||
} else {
|
||||
data_state
|
||||
};
|
||||
|
||||
@@ -413,7 +413,7 @@ async fn gateway_executes_openai_responses_cross_format_upstream_stream_via_loca
|
||||
"output_text": "Hello Gemini CLI",
|
||||
"output": [{
|
||||
"type": "message",
|
||||
"id": "upstream-cli-stream-123_msg",
|
||||
"id": openai_responses_message_item_id("upstream-cli-stream-123", 0),
|
||||
"role": "assistant",
|
||||
"status": "completed",
|
||||
"content": [{
|
||||
@@ -882,7 +882,7 @@ async fn gateway_executes_openai_responses_cross_format_function_call_upstream_s
|
||||
"output": [
|
||||
{
|
||||
"type": "message",
|
||||
"id": "upstream-cli-tool-123_msg",
|
||||
"id": openai_responses_message_item_id("upstream-cli-tool-123", 0),
|
||||
"role": "assistant",
|
||||
"status": "completed",
|
||||
"content": [{
|
||||
|
||||
Reference in New Issue
Block a user