Skip to content

Comments

test: Add test coverage for milvus_search and execute_tool #38

Open
Siva-Sainath wants to merge 1 commit intokubeflow:mainfrom
Siva-Sainath:main
Open

test: Add test coverage for milvus_search and execute_tool #38
Siva-Sainath wants to merge 1 commit intokubeflow:mainfrom
Siva-Sainath:main

Conversation

@Siva-Sainath
Copy link

Adds initial test coverage for core retrieval and tool-execution logic in app.py

Tests added

  • test_milvus_search.py - 7 tests covering happy path, custom top_k, empty results, error handling, and content truncation
  • test_execute_tool.py - 5 tests covering search_kubeflow_docs dispatch, citation collection, unknown tools, and malformed input

Support

  • conftest.py adds comprehensive fixtures and mocks for SentenceTransformer, Milvus, and KServe streaming
  • pytest.ini Pytest configuration with asyncio mode
  • requirements-dev.txt - test dependencies
  • .github/workflows/test.yml - automated CI workflow

Justification

These functions are the heart of the current RAG pipeline.
Tests are isolated with realistic mocks which follow deterministic patterns that catch regressions without flakiness

These tests represent the foundation, intend to add coverage for streaming, endpoints, frontend, pipelines or any of the new features that will be added to the codebase

Signed-off-by: Siva-Sainath <siva.explores06@proton.me>
@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign franciscojavierarceo for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant