feat(redis): move examples and test into a separate Go module#3726
feat(redis): move examples and test into a separate Go module#3726ash2k wants to merge 1 commit into
Conversation
This avoids having github.com/redis/go-redis/v9 as a dependency.
❌ Deploy Preview for testcontainers-go failed.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (7)
Summary by CodeRabbit
WalkthroughThe Redis example tests are extracted into a new standalone Go module ( ChangesRedis example module extraction
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
@ash2k I'd like to understand better the need for the separation, as the Go tool chain will strip any test dependency from the final binary you create, so no testcontainers-go dependency should land into the production binaries. Isn't that the case here? |
|
@mdelapenya This is optional. I thought it's nicer to not have anything extra as a dependency. Also, I think (but not 100% sure) all of the modules (even test dependencies of dependencies) participate in version resolution. Not a problem for me though. Feel free to close this. On the other hand, this repo did separate things into separate modules to cut down on dependency bloat, right? So this change basically follows the same idea. |
| @@ -1,4 +1,4 @@ | |||
| package redis_test | |||
| package example | |||
There was a problem hiding this comment.
This change seems wrong to me, as we will be removing the tests from the redis module.
I'm happy to have the example package (better to name it v9?) but the tests must live in the module itself.
What does this PR do?
Move examples and test for the Redis module into a separate Go module.
Why is it important?
This avoids having github.com/redis/go-redis/v9 as a dependency. I use a different Redis client and would like to avoid an extra dependency. Even if its coming via tests, it still shows up in go.sum.
Related issues