-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: add test for Tair DB #25
Conversation
Signed-off-by: daz-3ux <daz-3ux@proton.me>
from alibabacloud_vpc20160428.client import Client as Vpc20160428Client | ||
|
||
|
||
class Instance_info: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
参考 google python 风格 ,例如类名为 InstanceInfo 而不是 Instance_info
。
pass | ||
|
||
|
||
class AliyunRedisCompatibilityTester(CloudRedisCompatabilityTest): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件拆分一个目录,不同云厂商拆分开。
instance_infos = Instance_info(instance_id=instance_id, region_id=region_id, vpc_id=vpc_id, vsw_id=vsw_id) | ||
return instance_infos | ||
|
||
def configure_redis_instance(self, instance_infos): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们的流程应该是:
- create_vpc
- create_vsw
- create_ecs
- create_redis
- config_ecs_to_redis
- run_test_on_ecs
- fetch_test_result
- destory all resources
现在的流程是申请公网地址,这样行不通,例如 AWS 就不允许用户申请公网,而且你现在申请公网时候,将白名单配置了全开,也有漏洞风险。
print("清理阿里云Redis实例成功") | ||
|
||
|
||
if __name__ == "__main__": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分功能希望集成在 redis_compatibility_test --genhtml 的选项中。但是要优化下现有流程,例如解析完每个 DataBase 的 config ,都有一个 create runtest destory 的三个流程。只不过开源产品就是 docker 拉起来,但是云产品就要调用接口买。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我打算先优化现有流程,把代码和流程写规范,最后再加入这个继承,继承的实现可以单独开一个PR
No description provided.