java - 使用 Embedded Postgres 进行集成测试
问题描述
我按照此处提到的说明进行操作:https ://medium.com/@valeryyakovlev/embedded-postgres-test-config-ab8e4e0d3256
当我在本地运行时它工作正常,但在 gitlab CI 上构建时会出现以下错误。
Caused by:
org.springframework.beans.BeanInstantiationException: Failed to instantiate [ru.yandex.qatools.embed.postgresql.EmbeddedPostgres]: Factory method 'embeddedPostgres' threw exception; nested exception is de.flapdoodle.embed.process.exceptions.DistributionException: java.io.IOException: Could not open inputStream for http://get.enterprisedb.com/postgresql/postgresql-11.1-1-linux-x64-binaries.tar.gz
Caused by:
de.flapdoodle.embed.process.exceptions.DistributionException: java.io.IOException: Could not open inputStream for http://get.enterprisedb.com/postgresql/postgresql-11.1-1-linux-x64-binaries.tar.gz
Caused by:
java.io.IOException: Could not open inputStream for http://get.enterprisedb.com/postgresql/postgresql-11.1-1-linux-x64-binaries.tar.gz
Caused by:
java.io.IOException: Server returned HTTP response code: 403 for URL: http://get.enterprisedb.com/postgresql/postgresql-11.1-1-linux-x64-binaries.tar.gz
Gradle Test Executor 1 finished executing tests.
我发现一些提到自定义代理的来源:https ://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo#customize-proxy-for-download
它没有帮助。
解决方案
推荐阅读
- dialogflow-es - Dialogflow:当 SystemEntity:Time 的句子中未提供时间缩写 AM 或 PM 时,默认时间被视为 PM(下午)
- asterisk - 星号:如果号码是“号码”并且有多个条件,则重写设置来电显示
- qt5 - 使用 QSortFilterProxyModel 时选择模型得到错误的索引
- c - make 命令在 MacOS Big Sur - 11.5.2 上不起作用
- python - 如何从配置文件中获取描述
- c# - C# 在表示字符串的大字节数组中寻找子数组
- javascript - behaviorSubject 订阅时返回 [object][object]
- python - 从 Dockerfile 执行的 Python 脚本不会写入 HTML 文件
- swift - 如何为 SwiftUI 中的每个选项卡项设置不同的颜色?
- tomcat - 在 Apache Tomcat 10 上运行 Jakarta EE 9 需要哪些依赖项?