微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

测试容器:FileNotFoundException:.testcontainers.properties

如何解决测试容器:FileNotFoundException:.testcontainers.properties

我在 junit5 机器上运行 micronaut 应用程序的集成测试(使用 Windows 10 Pro)时遇到问题。我的测试依赖于我使用 Testcontainers Java 库定义的两个容器:RabbitMQMS sql serverDocker 版本为 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 时跳过读取此文件的步骤?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。