Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add unit test for src/store/user/slices/modelList/selectors/keyVaults.ts #5733

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

gru-agent[bot]
Copy link

@gru-agent gru-agent bot commented Feb 4, 2025

Trigger Info

Trigger Type Triggered By Source Pull Request Assignment
PR Created hezhijie0327 5729 Detail

Summary

This PR enhances the test coverage and functionality of the keyVaultsConfigSelectors module. Key updates include:

  1. Test Enhancements:

    • Added tests for the keyVaultsSettings selector to ensure it returns an empty object when no settings are provided.

    • Added tests for providerConfigs to validate configurations for all providers (openai, azure, bedrock, ollama, cloudflare).

    • Added tests for the password selector to confirm it retrieves the password from settings or returns an empty string if no password is set.

  2. Export Updates:

    • Explicitly exported additional selectors (azureConfig, bedrockConfig, cloudflareConfig, getVaultByProvider, isProviderApiKeyNotEmpty, isProviderEndpointNotEmpty, ollamaConfig, openAIConfig, password) for broader usability.

These changes improve the robustness and maintainability of the keyVaultsConfigSelectors module by ensuring comprehensive test coverage and clear exports.

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

Tip

You can @gru-agent rebase to rebase the PR.

Tip

You can @gru-agent redo to reset or rebase before redoing the PR.

Tip

To modify the test code yourself, click here Edit Test Code

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Feb 4, 2025
Copy link

vercel bot commented Feb 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview Feb 5, 2025 2:32am
lobe-chat-preview 🛑 Canceled (Inspect) Feb 5, 2025 2:32am

@lobehubbot
Copy link
Member

👍 @gru-agent[bot]

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@dosubot dosubot bot added azure ollama Relative to Ollama Provider and ollama models labels Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 93.87755% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.28%. Comparing base (3499403) to head (e64d8a3).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/libs/agent-runtime/AgentRuntime.ts 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5733      +/-   ##
==========================================
+ Coverage   92.11%   92.28%   +0.16%     
==========================================
  Files         648      646       -2     
  Lines       58199    58020     -179     
  Branches     2913     2713     -200     
==========================================
- Hits        53612    53541      -71     
+ Misses       4587     4479     -108     
Flag Coverage Δ
app 92.28% <93.87%> (+0.16%) ⬆️
server 98.01% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Author

gru-agent bot commented Feb 5, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail e64d8a3 ✅ Finished

Files

File Pull Request
src/config/llm.ts 🟢 Open #5753
src/features/Conversation/Error/APIKeyForm/index.tsx ❌ Failure (I failed to write the unit tests for the file.)
src/libs/agent-runtime/AgentRuntime.ts 🚫 Skipped (There's no need to update the test code)
src/libs/agent-runtime/wenxin/index.ts 🔴 Closed #5755
src/services/_auth.ts 🟢 Open #5754
src/store/user/slices/modelList/selectors/keyVaults.ts 🚫 Skipped (There's no need to update the test code)

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure ollama Relative to Ollama Provider and ollama models size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants