[feat(libra)]: 为 config 命令添加 --default=<default-value> 参数 #1119
Conversation
Signed-off-by: earsernoob <erasernoobx@outlook.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
… add extra test of --get-all
|
@genedna Hi! 我已经修复了之前提到的问题,麻烦有空再帮忙 review 一下~ Thanks |
|
你看一下 Action 中测试失败的愿意 |
|
@genedna , |
|
@genedna , |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for a new --default parameter to the config command in Libra. The changes include implementing default value handling in the command execution logic, adding tests for various edge cases associated with the --default parameter, updating the repository error messages, and revising the documentation.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libra/tests/command/config_test.rs | Added tests covering scenarios with and without the --default parameter |
| libra/src/command/config.rs | Updated command execution and validation logic to incorporate the --default parameter |
| libra/src/utils/util.rs | Updated error message to refer to a libra repository instead of a git repository |
| aria/contents/docs/libra/command/config/index.mdx | Revised documentation to include usage details for the new --default parameter |
Comments suppressed due to low confidence (1)
libra/tests/command/config_test.rs:8
- Consider capturing and asserting the stdout output in these tests rather than relying solely on printed output, which will improve automated verification of the behavior.
async fn test_config_get_failed() {
pr 完成了 r2cn 测试任务 #1116 ,为
config命令添加--default=<default-value>参数同时在 config_test 中添加了相对应的三个边界情况测试用例.
get参数无--default参数情况执行结果为:
Initializing empty Libra repository in /tmp/.tmpES28oF/.libra--default参数无get或get-all参数情况执行结果如下:
get与--default参数都设置执行结果如下:
Initializing empty Libra repository in /tmp/.tmpAYdWuR/.libra erasernoob