-
-
Couldn't load subscription status.
- Fork 584
chore(registry): use Run function #3431
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(registry): use Run function #3431
Conversation
🤖 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 registry module to use functional optionizers and testcontainers.Run. Updates options to apply files and env via testcontainers.WithFiles/WithEnv with error chaining. Run now builds moduleOpts (ports, env, wait strategy) and invokes testcontainers.Run, adjusting error text. No public API signature changes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Caller
participant Reg as Registry.Run
participant TC as testcontainers.Run
participant Docker as Runtime
Note over Reg: Build moduleOpts<br/>- WithExposedPorts<br/>- WithEnv<br/>- WithWaitStrategy
Dev->>Reg: Run(ctx, img, opts...)
Reg->>TC: Run(ctx, img, moduleOpts+opts)
TC->>Docker: Create & start container
Docker-->>TC: Container started / error
TC-->>Reg: Container or error
alt success
Reg-->>Dev: *RegistryContainer
else error
Reg-->>Dev: error ("run registry: %w")
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 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/registry/registry.go (3)
modules/registry/options.go (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
🔇 Additional comments (3)
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 registry
Why is it important?
Migrate modules to the new API, improving consistency and leveraging the latest testcontainers functionality.
Related issues