Add --local-operator-flags for testing with --up-local#1509
Merged
lilic merged 1 commit intooperator-framework:masterfrom Jun 5, 2019
Merged
Conversation
--local-operator-flags in for testing with --up-locale87e94f to
989c646
Compare
989c646 to
e0fbbb5
Compare
This patch adds `--local-operator-flags` to `operator-sdk test local --up-local` command It is prvides the functionalisty provided by `--operator-flags` flag in `operator-sdk up local --operator-flags` command. At present there is no way to pass command line flags to an operator while testing using `operator-sdk test local --up-local` command. There is a flag `--go-test-flags` but it cannot be used to pass flags to the operator code being tested using `--up-local` flag This resolves operator-framework#1476 : **Custom flags for test local (no go test ones)** Signed-off-by: Nikhil Thomas <nikthoma@redhat.com >
e0fbbb5 to
f97341c
Compare
|
it would be nice to see this merged in! |
AlexNPavel
approved these changes
Jun 4, 2019
Contributor
AlexNPavel
left a comment
There was a problem hiding this comment.
LGTM. This needs some E2E tests to make sure we don't accidentally break the functionality later, but we can handle that in a separate PR.
Contributor
Author
true, I shall add an e2e test in a different PR. 👍 |
lilic
approved these changes
Jun 5, 2019
Member
lilic
left a comment
There was a problem hiding this comment.
Thanks for your contribution! lgtm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
operator-sdk test : add
--local-operator-flagstooperator-sdk test local --up-localcommandwhy this change was made: without this flag, we cannot write tests to test operator code that uses command line flags. A flag like this is already there in
operator-sdk up localcommand (--operator-flags).Fixes #1476
Description of the change:
This patch adds
--local-operator-flagstooperator-sdk test local --up-localcommandIt is provides the functionality provided by
--operator-flagsflag inoperator-sdk up local --operator-flagscommand.Motivation for the change:
At present there is no way to pass command line flags to an operator
while testing using
operator-sdk test local --up-localcommand.There is a flag
--go-test-flagsbut it cannot be used to pass flags tothe operator code being tested using
--up-localflagSigned-off-by: Nikhil Thomas <nikthoma@redhat.com >