-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add error messages for contradicting flags #330
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Svetoslav Blyahov <[email protected]>
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.
A few typos and would recommend adding a test
cmd/init.go
Outdated
@@ -260,6 +268,20 @@ func validatePrivateTransactionManagerBlockchainConnectorCombination(privateTran | |||
return nil | |||
} | |||
|
|||
func validateRemoteNodeVsBlockChainNodeFlags(remoteNodeUrl, blockchainNodePorvider string) error { | |||
if len(remoteNodeUrl) != 0 && blockchainNodePorvider != "geth" { | |||
return errors.New("`remote-noted-url` and `blockchain-node` can't both be specified") |
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.
return errors.New("`remote-noted-url` and `blockchain-node` can't both be specified") | |
return errors.New("Both flags `remote-node-url` and `blockchain-node` can't be specified") |
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.
hi @EnriqueL8, thanks for your review. I will correct the text and look for a place where to place the test.
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.
hi @EnriqueL8, now that I took a deeper look, I remembered why I didn't provide tests initially. I didn't find any of the initCommon
behavior to have been tested. Can you please let me know if I'm mistaken, or if not - and still a test needs to be written for this part - where, according to the practices of this repo, shall it be?
Thanks in advance for your help.
Aims to fix the issue mentioned here #290