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

add unittest for common/ssh_client package #364

Merged
merged 10 commits into from
Aug 6, 2024

Conversation

xiaodong-ji
Copy link
Contributor

Summary

common/ssh_client 包添加单元测试
close #351

Solution Description

使用通义灵码协助开发
obdiag03

@wayyoungboy
Copy link
Contributor

test/init.py 这个文件没有必要删除即可。
别的都行

@xiaodong-ji
Copy link
Contributor Author

test/init.py 这个文件没有必要删除即可。 别的都行

如果删除这个文件执行命令 python -m unittest -v ~/obdiag/test/common/ssh_client/test_local_client.py 会报错:ModuleNotFoundError: No module named 'test.common'

@Teingi
Copy link
Contributor

Teingi commented Jul 28, 2024

Add tianchi-competition-2024 label Now!

@Teingi
Copy link
Contributor

Teingi commented Aug 1, 2024

提交代码后需要确认是否报名成功了,步骤如下:
报名参赛步骤:报名——下载选手方案提交模版——提交结果
赛事报名官网:https://tianchi.aliyun.com/competition/entrance/532215/submission/1282​
image

表格内容要求:​

  1. 选手需提供GitHub个人设置页面截图和通义灵码辅助编码使用截图(此项在提交模板里有参考截图示意。)​
  2. 相关内容需要填写:
    image

将​参赛表格​内容填写后,提交到【提交结果】中​
image

如有疑问可加入赛事交流群:钉钉群号:75530009710​

@Teingi
Copy link
Contributor

Teingi commented Aug 5, 2024

建议:增加一下单测流水线,参考https://github.com/oceanbase/obdiag/blob/master/.github/workflows/test_sql_rule.yml

@xiaodong-ji
Copy link
Contributor Author

建议:增加一下单测流水线,参考https://github.com/oceanbase/obdiag/blob/master/.github/workflows/test_sql_rule.yml

OK

test/__init__.py Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件删除

push:
branches: "*"
pull_request:
branches: "*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

目前暂时没有比较好的mock client的方案,这个流水线branch限制为dev分支吧

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好嘞,我改下

@Teingi
Copy link
Contributor

Teingi commented Aug 6, 2024

代码格式化的流水线没跑过,其中obdiag/test/common/ssh_client/test_remote_client.py文件没有格式化代码。需要执行一下
black --check -S -l 256 .
参考文档:https://oceanbase.yuque.com/org-wiki-obtech-vh7w9r/imzr6c/dio3s4re84gz54pp

@xiaodong-ji
Copy link
Contributor Author

代码格式化的流水线没跑过,其中obdiag/test/common/ssh_client/test_remote_client.py文件没有格式化代码。需要执行一下 black --check -S -l 256 . 参考文档:https://oceanbase.yuque.com/org-wiki-obtech-vh7w9r/imzr6c/dio3s4re84gz54pp

好嘞,已执行

Copy link
Contributor

@wayyoungboy wayyoungboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wayyoungboy wayyoungboy merged commit 080682f into oceanbase:master Aug 6, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: 使用通义灵码给 common/ssh_client 包添加单元测试及注释
3 participants