-
-
Notifications
You must be signed in to change notification settings - Fork 257
RedisContainer does not accept arbitrary setup commands #1150
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Expected Behaviour
Running tests with Redis, we want to run the DB in-memory to save time and resources.
Using withCommand does not apply the commands correctly
const redis = await new RedisContainer("redis:7")
.withCommand(["redis-server", "--save", "0", "--appendonly", "no"])
.start()
Actual Behaviour
The container always runs with the default arguments:
| this.withCommand(["redis-server", ...redisArgs]); |
Testcontainer Logs
...
Steps to Reproduce
Create a test container with arguments:
const redis = await new RedisContainer("redis:7")
.withCommand(["redis-server", "--save", "0", "--appendonly", "no"])
.start()
Log the actual arguments in the redis-container file
Environment Information
- Operating System: Pop_OS 22.04
- Docker Version: 28.4.0
- Node version: 22.18.0
- Testcontainers version: 11.5.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers