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

feat: add test for Tair DB #25

Closed
wants to merge 1 commit into from
Closed

feat: add test for Tair DB #25

wants to merge 1 commit into from

Conversation

Daz-3ux
Copy link
Collaborator

@Daz-3ux Daz-3ux commented Sep 21, 2023

No description provided.

Signed-off-by: daz-3ux <daz-3ux@proton.me>
from alibabacloud_vpc20160428.client import Client as Vpc20160428Client


class Instance_info:
Copy link
Member

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):
Copy link
Member

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):
Copy link
Member

Choose a reason for hiding this comment

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

我们的流程应该是:

  1. create_vpc
  2. create_vsw
  3. create_ecs
  4. create_redis
  5. config_ecs_to_redis
  6. run_test_on_ecs
  7. fetch_test_result
  8. destory all resources

现在的流程是申请公网地址,这样行不通,例如 AWS 就不允许用户申请公网,而且你现在申请公网时候,将白名单配置了全开,也有漏洞风险。

print("清理阿里云Redis实例成功")


if __name__ == "__main__":
Copy link
Member

@yangbodong22011 yangbodong22011 Sep 22, 2023

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 拉起来,但是云产品就要调用接口买。

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

我打算先优化现有流程,把代码和流程写规范,最后再加入这个继承,继承的实现可以单独开一个PR

@Daz-3ux Daz-3ux closed this Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants