fix tests

This commit is contained in:
Adil Hafeez 2025-12-16 10:14:37 -08:00
parent 07208f95ab
commit 54a3d45bbf
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
2 changed files with 15 additions and 16 deletions

View file

@ -57,6 +57,10 @@ def convert_legacy_listeners(
"timeout": "30s", "timeout": "30s",
} }
# Handle None case
if listeners is None:
return [llm_gateway_listener], llm_gateway_listener, prompt_gateway_listener
if isinstance(listeners, dict): if isinstance(listeners, dict):
# legacy listeners # legacy listeners
# check if type is array or object # check if type is array or object

View file

@ -94,21 +94,16 @@ def test_validate_and_render_happy_path_agent_config(monkeypatch):
version: v0.3.0 version: v0.3.0
agents: agents:
- name: query_rewriter - id: query_rewriter
kind: openai url: http://localhost:10500
endpoint: http://localhost:10500 - id: context_builder
- name: context_builder url: http://localhost:10501
kind: openai - id: response_generator
endpoint: http://localhost:10501 url: http://localhost:10502
- name: response_generator - id: research_agent
kind: openai url: http://localhost:10500
endpoint: http://localhost:10502 - id: input_guard_rails
- name: research_agent url: http://localhost:10503
kind: openai
endpoint: http://localhost:10500
- name: input_guard_rails
kind: openai
endpoint: http://localhost:10503
listeners: listeners:
- name: tmobile - name: tmobile
@ -156,7 +151,7 @@ listeners:
mock.mock_open().return_value, # ARCH_CONFIG_FILE_RENDERED (write) mock.mock_open().return_value, # ARCH_CONFIG_FILE_RENDERED (write)
] ]
with mock.patch("builtins.open", m_open): with mock.patch("builtins.open", m_open):
with mock.patch("config_generator.Environment"): with mock.patch("cli.config_generator.Environment"):
validate_and_render_schema() validate_and_render_schema()