-
-
Notifications
You must be signed in to change notification settings - Fork 584
chore(valkey): use Run function #3440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(valkey): use Run function #3440
Conversation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
This commit migrates the valkey module to use the new testcontainers.Run() API. The main changes are: - Use testcontainers.Run() instead of testcontainers.GenericContainer() - Use entrypoint for valkey-server process and WithCmd/WithCmdArgs for arguments - Simplify WithConfigFile to prepend config file as first argument - Simplify WithLogLevel and WithSnapshotting to use WithCmdArgs directly - Process custom options before building module options for TLS support - Update option tests to reflect entrypoint-based approach Ref: testcontainers#3174 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Summary by CodeRabbit
WalkthroughRefactors valkey module to use option-based testcontainers.Run with WithCmd/WithCmdArgs/WithFiles and updated wait strategy/TLS handling. Tests are adjusted to remove automatic server binary prefixing and to align expectations with the new option-driven command construction and config naming. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as Caller
participant V as Valkey.Run
participant TC as testcontainers.Run
participant C as Container
U->>V: Run(ctx, image, opts...)
V->>V: Build moduleOpts (ExposedPorts, Entrypoint)
alt TLS enabled
V->>V: Add TLS files and args (WithFiles, WithCmdArgs)
end
opt Config file provided
V->>V: WithFiles(config), WithCmd(config path)
end
opt Log level/snapshotting
V->>V: WithCmdArgs(--loglevel/--save ...)
end
V->>TC: Run(ctx, image, moduleOpts..., opts...)
TC-->>V: Container or error
V-->>U: Container or wrapped error
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (2)modules/valkey/options_test.go (1)
modules/valkey/valkey.go (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What does this PR do?
Use the Run function in valkey
Why is it important?
Migrate modules to the new API, improving consistency and leveraging the latest testcontainers functionality.
Related issues