Replies: 1 comment 3 replies
-
Can you please format your questions. It is unlikely that someone will even read it that way. Regarding your issue. You can override the base image either with: _ = new MongoDbTestcontainerConfiguration("mongo:latest") or .WithDatabase(new MongoDbTestcontainerConfiguration())
.WithImage("mongo:latest") But the latest MongoDB Docker image (since version 6) has some breaking changes that are not compatible with the current configuration. As far as I know, it replaces I was trying to change the CLI executable to |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Unable to use mongo:latest image version, my docker images do get created with the latest version but the integration tests hang none run and no data is added into them I have to manually stop the tests because they don't execute aka they don't even fail or succeed only stuck.
_dbContainer = new TestcontainersBuilder<MongoDbTestcontainer>().WithDatabase(new MongoDbTestcontainerConfiguration { Database = "PrismPrivateApiGatewayDb", Username = "", Password = "" }).Build(); await _dbContainer.StartAsync();
I am using testcontainers to spin off temporary mongodb docker containers to run my integration tests using xunit so that I don't need to write any tear down methods.
The above code will spin off a mongo:5.0.6 version instead of mongo:latest I tried adding a .WithImage("mongo:latest") but the StartAsync keeps hanging.
I tried new MongoDbTestcontainerConfiguration { Database = "PrismPrivateApiGatewayDb", Username = "", Password = "", Image= "mongo:latest" } but the property has a get; only and not a set...
Beta Was this translation helpful? Give feedback.
All reactions