docker - 测试容器:FileNotFoundException:.testcontainers.properties
问题描述
我在我的机器上运行我的应用程序的集成测试(使用JUnit5
)时遇到问题。我的测试依赖于两个容器,我使用Testcontainers java library:和. 版本是.micronaut
Windows 10 Pro
RabbitMQ
MS SQL server
Docker
v19.03.13
在运行集成测试时,我收到以下异常:
[WARN ][DESKTOP-PBCHP60] [testcontainers.utility.TestcontainersConfiguration] – Attempted to read Testcontainers configuration file at file:/$HOME.testcontainers.properties but the file was not found. Exception message: FileNotFoundException: $HOME\.testcontainers.properties (The system cannot find the file specified)
macOS
虽然,从机器运行测试时我没有得到这个异常。我的假设是它是Windows
具体的。
谁能告诉我如何解决它?我应该自己创建所需的文件吗?或者也许有一种方法可以在运行 IT 期间跳过读取此文件的步骤?
解决方案
推荐阅读
- apache-kafka - 卡夫卡客户端和弹簧的奇怪行为
- android-studio - FAILURE:运行应用程序时构建失败并出现异常错误
- sql - 如何从数据库中访问三个表
- python - 你可以在 github 课堂自动评分中使用秘密测试吗?
- azure - Azure PowerShell 检索云经典证书
- c - 如何读取空格分隔的信息,包括一个可能有空格的字段?
- r - 将 Azure Databricks 中的非 SparkDataFrame 作为 .RData 保存到本地计算机
- c - 函数指针和另一种类型之间的转换 [MISRA 2012 规则 11.1,必需] | pclint 9074
- sql - 如何将电子邮件地址与正则表达式匹配?
- php - PHP:为什么每次都返回“未定义的偏移量”?