cost 97 ms
使用 Spock 执行单元测试时,JpaRepository 未被注入并返回为 null - When performing unit testing using Spock, JpaRepository is not being injected and is returning as null

在我使用 Spock 和 Testcontainers 进行单元测试期间,JpaRepository 无法正常运行并且未正确连接。 这个问题甚至在非集成测试中仍然存在。 正如另一个讨论中所建议的那样,我试图通过将 spock-spring 依赖项添加到我的 pom.xml 文件来解决这个问题。 它 ...

如何防止在 spock micronaut 测试中使用生产 MongoDB URI - How to prevent using production MongoDB URI in spock micronaut tests

我如何确保我的测试永远不会在我的 Micronaut 应用程序中使用生产 MongoDB URI? 我目前在我的测试配置中使用嵌入式服务器来使用测试 MongoDB 容器运行我的测试,如下所示: 而我的 application.yml 中的 MongoDB 配置是这样的: 我担心的是未来的开发人员 ...

Golang testcontainers vs Azure Devops 管道:容器随机终止? - Golang testcontainers vs Azure Devops pipelines: Containers killed randomly?

虽然使用 golang testcontainers 实施和运行我的数据库集成测试在本地非常有效,但似乎我的测试在 azure devops 管道中随机不起作用。 管道日志显示: 添加容器日志记录、改进等待条件、删除 db 容器配置文件的使用(这样我就不必将文件复制到容器中)并禁用 Ryuk 之后 ...

在 docker 运行使用 testcontainers 的 do.net 测试 - Run dotnet tests in docker which use testcontainers

我有一个在 VS 中按预期执行的集成测试项目。 集成测试使用 MsSql 测试容器(来自https://do.net.testcontainers.org/ )。 我的目标是在 docker 图像内的 Azure DevOps 管道中运行这些测试,正如我在其他不使用测试容器的项目中成功完成的那样。 ...

在 Docker 图像内的 Jenkins (AKS) 上运行测试容器 - Running testcontainers on Jenkins (AKS) inside Docker image

我正在尝试运行 Jenkins 管道来运行我的测试用例。 我的测试用例使用测试容器框架。 Jenkins 已安装超过 Azure Kube.netes 服务 (AKS)。 当我尝试执行管道时,Azure 不允许修改 Docker 套接字,并且此命令不起作用: -v /var/run/docker. ...

使用不同的默认端口配置 Minio 测试容器 - Configuring Minio Testcontainers with different default port

快速总结:如何更改在我的测试容器中运行的 minio 客户端的默认端口? 我想在我的应用程序中使用 minio 作为测试容器,当我在本地启动它时它已经在工作了。 这是我用来运行测试容器的代码片段: 一旦我将它部署到我们的集群上,其中还有一个 minio 容器正在端口 9000 上运行,它就会在控制台 ...

docker.sock:在 Windows 上将 testContainers 与 Podman 一起使用时权限被拒绝 - docker.sock: permission denied when using testContainers with Podman on Windows

我的 Java & Spring 启动应用程序集成测试使用testContainers ,我在我的 Windows 机器上使用Podman 。 尝试运行集成测试时,出现此权限错误: 所有的集成测试都失败了。 我需要向 Podman 提供特定的权限命令吗? ...

TestContainers 无法在 Oracle XE 11.2.0.2-slim-faststart 映像上运行初始化脚本 - TestContainers fails to run init script on Oracle XE 11.2.0.2-slim-faststart image

我正在尝试在使用 Testcontainers 运行 gvenzl/oracle-xe:11.2.0.2-slim-faststart 图像时执行初始化脚本。 但它一直失败并显示以下日志: 下面是我如何启动测试容器: 我使用具有相同设置的 Docker 运行了相同的图像,它按预期工作。 任何建议将不 ...

Trino testcontainer 在 docker 版本 19.x 上失败并在 docker 版本 20.x 上成功加载 - Trino testcontainer fails on docker version 19.x and successfully loaded on docker version 20.x

在 docker 版本“服务器版本:19.03.8”上,trino 测试容器失败,但 docker 版本 docker 版本“服务器版本:20.10.18”成功启动。 从文档中我看到最低 docker 版本是 Docker v17.09,docker 版本是我的问题吗? 我期望 trino test ...

Gitlab 管道上的 TestContainers“JedisConnectionException:无法从池中获取资源” - TestContainers "JedisConnectionException: Could not get a resource from the pool" on Gitlab pipeline

我正在使用TestContainers进行 Redis 集群集成测试; 尽管在本地一切都按预期工作,但在创建远程分支并将代码推送到 Gitlab 管道后,我得到了以下异常。 我有 Cassandra 和 PostgreSQL 工作正常,但对于 Redis,我得到以下异常。 更新:之前使用fixed ...

Springboot集成测试如何配置数据库镜像 - How to configure the database image for Springboot integration testing

有一种情况,我想使用数据库映像来集成测试我的服务层。 这是我为设置 Postgres 容器映像而开发的代码: 现在我想使用测试数据库调用我的服务层方法并检查结果,这是我的集成测试示例: 但是当我运行测试时,它返回以下错误: 请问如何在运行我的测试时解决这个问题? ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM