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

[Feature]Support running tests with testcontainers(#870) #876

Conversation

haoqi6677
Copy link
Contributor

@haoqi6677 haoqi6677 commented Jan 26, 2023

请不要在没有先创建Issue的情况下创建Pull Request。

变更的目的是什么

测试部分代码集成testcontainers(#870)

简短的更新日志

  1. 删除core中test依赖
  2. 排除persistence中junit依赖
  3. 添加testcontainers依赖
  4. 实现testcontainers基础框架
  5. 调整现有各个测试方法,使其可以测试通过

验证这一变化

1.(建议) 先拉取对应镜像,不然会执行特别慢
2. 执行mvn test提示BUILD SUCCESS

请遵循此清单,以帮助我们快速轻松地整合您的贡献:

  • 一个 PR(Pull Request的简写)只解决一个问题,禁止一个 PR 解决多个问题;
  • 确保 PR 有对应的 Issue(通常在您开始处理之前创建),除非是书写错误之类的琐碎更改不需要 Issue ;
  • 格式化 PR 及 Commit-Log 的标题及内容,例如 [Bugfix]修复用户信息修改后,用户列表会抛出空指针异常的问题(#860) #861 。PS:Commit-Log 需要在 Git Commit 代码时进行填写,在 GitHub 上修改不了;
  • 编写足够详细的 PR 描述,以了解 PR 的作用、方式和原因;
  • 编写必要的单元测试来验证您的逻辑更正。如果提交了新功能或重大更改,请记住在 test 模块中添加 integration-test;
  • 确保编译通过,集成测试通过;

@ZQKC
Copy link
Collaborator

ZQKC commented Jan 28, 2023

感谢PR,最近在休假,晚点验证一下

@haoqi6677
Copy link
Contributor Author

感谢PR,最近在休假,晚点验证一下

目前只在unix系统上验证了testcontainers,在windows上还没验证,想的是再加上mock数据库的逻辑,这样可以实现多操作系统,是否有添加的必要呢?

@haoqi6677 haoqi6677 closed this Jan 30, 2023
@haoqi6677
Copy link
Contributor Author

想了两天,总感觉差点意思,还是感觉再优化一下

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.

None yet

2 participants