1,185 questions
0
votes
1
answer
42
views
Why does `.WithInitScripts` not run my SQL files?
Description
I am using a test Postgres container (from testcontainers) for more accurate integration tests. To prevent repeating code, I want to use my existing SQL migration files to setup the ...
Advice
0
votes
0
replies
25
views
Testcontainers issues
My current employer is a bank. They have some security products installed on the assigned macbooks:
Crowdstrike falcon
zscaler
ms defender
I am not sure what else is installed. I have used ...
0
votes
1
answer
59
views
Configuring same network for multiple generic containers does not work
I am trying to create multiple containers using testcontainers lib which are sharing the same Network. What do I have right now is the following:
network = Network.newNetwork();
container1 = new ...
1
vote
1
answer
57
views
testcontainers initializing dockerclient twice - the second time on container.start
I am trying to create a container with oracle db to run tests. Due to some restrictions, I have to use rootless podman instead of docker. Here is how I do it:
def _container_env_kwargs() -> dict:
...
1
vote
1
answer
58
views
How to have fixed Postgres port in Quarkus dev container
Each time my Quarkus app restarts it has a different Postgres port. There is testcontainers.reuse.enable=false in the ~/.testcontainers.properties. MacOS, run from Idea.
0
votes
0
answers
41
views
Micronaut ignores test container
Here is part of my test:
@MicronautTest(startApplication = false)
@Testcontainers(disabledWithoutDocker = true)
class AggMapperIT : TestPropertyProvider {
@Inject
lateinit var aggMapper: ...
1
vote
0
answers
39
views
Conditional data sources in SpringBoot integration test
I have a SpringBoot app and I have added JUnit5 integration tests that use testcontainers:
class ControllerClassTest extends AbstractIntegrationTest {
@ParameterizedTest(name = "{0}")
...
0
votes
0
answers
70
views
How to create integration tests with Keycloak and xUnit?
I'm creating a new project with Keycloak and .NET Core 9. I've managed to get it working with my application, but I need to make it work with my integration tests.
To integrate authorization and ...
0
votes
0
answers
43
views
What is the correct configuration of Testcontainers and LocalStack to test S3ControlClient createAccessPoint?
When testing s3ControlClient.createAccessPoint(request); I am getting a NPE due to the underlying URL having the default accountId + localhost as the URI. This AWS toolkit cannot identify a host and ...
0
votes
2
answers
130
views
System.InvalidOperationException : Sequence contains more than one element for DotNet Testcontainer
Error Log:
Standard Output Messages:
[testcontainers.org 00:00:03.98] Reuse is an experimental feature. For more information, visit: https://dotnet.testcontainers.org/api/resource_reuse/
-> warning:...
0
votes
1
answer
350
views
Oracle testcontainer is not starting in the pipeline
I am using Java 21 and Spring Boot 3.3.3, and starting a test container with Oracle DB in my integration tests like this:
build.gradle:
testImplementation "org.testcontainers:oracle-free:1.20.1&...
1
vote
0
answers
85
views
VSCode Dev Container Permission Errors
I am trying to improve and generalize my develop setup with Dev Containers + Podman + Test Containers. I am running into some permission issues though. Specifically, running test container tests in a ...
0
votes
1
answer
87
views
Is there any ability to use Yandex DB with TestContainers?
I managed to run YDB in testContainers, but it looks impossible to establish a connection for query, because of discovery mode. My client establishes a connection to ydb inside a testContainer(in ...
1
vote
1
answer
110
views
Asserting against DB state in Spring Boot integration test
How do I check the DB state in an integration test? Is injecting a JdbcTemplate the only option?
For example, you test a PATCH that, if successful, should update certain table cells.
I can't use a ...
2
votes
1
answer
82
views
Testcontainers test isolation for all CRUD operations using Spring
I'm facing a problem where one of my integration tests affects the other. For example this delete test:
class DeleteCustomerIntegrationTest extends AbstractConfigurationTest {
@Test
void ...
1
vote
1
answer
100
views
Setting keycloak TOTP execution as REQUIRED
I am writing integration tests in which I use testcontainers with keycloak 24.0.5. I want to enable totp for the admin realm. It's easy to set this setting in the GUI but I need to set it ...
0
votes
0
answers
55
views
Quarkus test containers not being removed after test completion
I ran a sample quarkus project. Did some modification and ran the test that existed with the project, I realized that after running tests from either intellij or mvn quarkus:test
application.yml
...
0
votes
1
answer
80
views
How to define a TestConfiguration for TestContainers?
I have multiple test classes that use the mongo test container. Instead of declaring a container using the same code multiple times, I wanted to create a test configuration, to avoid repetitive code. ...
1
vote
1
answer
187
views
DBRider(DBUnit) won't insert data into test container in spring boot
Can anyone using DBRider / Test Container in spring boot give advice ?
I've been using DBRider/Testcontainer without any issue, but at some point , it doesn't work out.
It seesm ...
1
vote
0
answers
42
views
Docker on WSL2 bind mounted files are created as folder
I'm trying to write integration tests for my java application using testcontainers (version 1.20.6). I'm working on a windows (without Docker Desktop on windows, I cannot use it).
I want to test my ...
0
votes
0
answers
47
views
Where does this Mongo stacktrace come from in a Spring Boot app?
I have a Spring Boot 3.4.2 app, which has several databases and services configured, including MongoDB. There are 2 connections to MongoDB, each with their own credentials and database they access.
...
0
votes
0
answers
96
views
Intermittent Login Failed errors with Integration Tests using SQL Server TestContainers with transactions
I'm spinning up a WebApplicationFactory against our main API's Program.cs, mocking out services as needed, and then calling several integration tests against different endpoints.
For the database, we'...
-2
votes
1
answer
131
views
How to bind ports in kafka configuration and test container
First, if this question is duplicated, please forgive me.
I'm trying to create an integration test with kafka and testcontainers, and i'm facing the problem that my kafka config (i suspect) is not ...
0
votes
0
answers
29
views
Elasticsearch TestContainer with mapper size plugin (.NET)
I'm trying to setup an Elasticsearch TestContainer that uses the mapper size plugin. I'm unsure how to go about this, particularly since the documentation notes that all Elasticsearch nodes must be ...
0
votes
1
answer
189
views
How to do integration testing in Spring Cloud Gateway and keycloak?
I wanted to add integration tests for my spring cloud gateway. I found test containers and using that I spin up two services, keycloak container and gateway.
Now I can already get the access token ...