-
Notifications
You must be signed in to change notification settings - Fork 558
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
rpk start: add tests #270
rpk start: add tests #270
Conversation
2d36602
to
cd0a838
Compare
@0x5d this is more of a discussion, but what about other commands. Can you describe what injection points are left. I imagine
would all basically be under different interfaces |
@senior7515 so for Environment: covered. |
@senior7515 can I merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes seem fine. I didn't review the tests.
You could have a test for Also, there are other flags, like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending Ben's comments.
my 2 cents, probably out of scope for this PR:
I can't help but wonder how we could make configuration testing easier. Having tests for every flag to verify that Get value from env if not provided through cli
works should be tested centrally in some way and as a whole for the configuration 🤔
Change redpanda/launcher to receive the install dir & redpanda args in Start, as opposed to when it's initialized, since it doesn't require them then. This will allow to change cmd.Start to receive a Launcher instance, making it possible to unit test it.
cd0a838
to
aec5453
Compare
Yeah. Ben and I were discussing that in a previous PR. The |
aec5453
to
861c7e4
Compare
I will fix this in another PR :D
Yeah, but these don't need to be parsed and checking them is harder, since they're not persisted but passed to |
Make
rpk start
testable by injecting theredpanda.Launcher
instance instead of creating it when the command runs, allowing for mocking it and recreating various scenarios.Fix #213