ci: Add temporary database setup for performance tests (#4469)

Add temporary database setup for performance tests and assertions for database URL
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-11-08 11:41:01 -03:00 • committed by GitHub
commit 7114cc4799
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 36 additions and 1 deletions

View file

@ -60,6 +60,7 @@ async def test_component_message_sending():
assert isinstance(sent_message.content_blocks[0].contents[0], TextContent)
@pytest.mark.usefixtures("client")
async def test_component_tool_output():
"""Test component's tool output functionality."""
# Create event queue and manager
@ -92,6 +93,7 @@ async def test_component_tool_output():
assert isinstance(sent_message.content_blocks[0].contents[0], ToolContent)
@pytest.mark.usefixtures("client")
async def test_component_error_handling():
"""Test component's error handling."""
# Create event queue and manager
@ -123,6 +125,7 @@ async def test_component_error_handling():
assert "Test error" in str(sent_message.text)
@pytest.mark.usefixtures("client")
async def test_component_build_results():
"""Test component's build_results functionality."""
# Create event queue and manager
@ -154,6 +157,7 @@ async def test_component_build_results():
assert artifacts["text_output"]["type"] == "text"
@pytest.mark.usefixtures("client")
async def test_component_logging():
"""Test component's logging functionality."""
# Create event queue and manager
@ -188,7 +192,7 @@ async def test_component_logging():
assert event_id.startswith("info-")
@pytest.mark.asyncio
@pytest.mark.usefixtures("client")
async def test_component_streaming_message():
"""Test component's streaming message functionality."""
queue = await create_event_queue()