Add test case coverage for OpenAI backend and CLI frontend#17
Merged
jbencina merged 12 commits intodev-v0.6.0from May 19, 2025
Merged
Add test case coverage for OpenAI backend and CLI frontend#17jbencina merged 12 commits intodev-v0.6.0from
jbencina merged 12 commits intodev-v0.6.0from
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds extensive test coverage for OpenAI backend and CLI frontend functionality through new unit tests and updated settings/CLI output to support recent API changes.
- New tests for file storage/sync, thread, assistant management, and chat response streaming.
- Updated field name from "updated_count" to "remote_count" in sync results and corresponding CLI output.
- Adjusted Settings initialization and client setup to handle a Path-typed settings_path.
- Updated changelog and CI workflow to reflect new test cases and environment variables.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/openai/test_openai_store.py | Added tests for vector store file management and sync operations |
| tests/openai/test_openai_chat.py | Added tests covering assistant, thread, and message response |
| tests/openai/conftest.py | Introduced mocks and fixtures for OpenAI client/backend testing |
| src/vecsync/store/openai.py | Replaced "updated_count" with "remote_count" in sync results |
| src/vecsync/settings.py | Updated Settings constructor to accept Path types |
| src/vecsync/cli/sync.py | Updated CLI output to use the new "remote_count" field |
| src/vecsync/cli.py | Updated CLI sync command to print "remote_count" consistently |
| src/vecsync/chat/clients/openai.py | Modified client initialization and settings handling |
| CHANGELOG.md | Updated changelog with new commands and test case coverage |
| .github/workflows/ci.yaml | Added dummy OpenAI API key for CI |
4d90036 to
f1546ed
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR creates a mock backend for OpenAI to validate the behavior of all OpenAI API commands used by the application. This mock backend allows for testing of all OpenAI operations (closes #15). The LLM output is not covered by the test suite at this time.
Test coverage added:
Test Plan
Passed all new unit tests