-
Notifications
You must be signed in to change notification settings - Fork 769
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
remove unknown args and added tests #211
Conversation
486d2f6
to
d4f95ad
Compare
can you rebase now that the rename has happened? |
d4f95ad
to
5e8ebfa
Compare
@dustymabe rebase done. |
@procrypt - can you "sign the cla"? basically create a linuxfoundation account with your redhat email address and then visit this link and "sign up as an employee". |
@@ -253,3 +256,10 @@ func askForConfirmation() bool { | |||
return askForConfirmation() | |||
} | |||
} | |||
|
|||
func unknownArgs(c *cli.Context) { |
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.
my preference would be to rename this function to TestForUnknownArgs
or CheckForUnknownArgs
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.
@dustymabe sure i'll rename the function.
7e9cb9a
to
9045024
Compare
Just one thing. Have you consider putting that check to I'm not saying that you should change it like this. I'm just interested why you did it like this. Valid answer can be that you think that it makes more sense the way you did it. 😉 I tested your code and it works great. 👍 |
@kadel I didn't know about the function |
I think that would be better to have all the validation on one place ;-) |
@kadel I'll update the PR :) |
Oh and one more think. It looks like your commit has some weird Author. |
I'll check and make sure it will be correct this time. |
5df25ce
to
5ef3fcc
Compare
@@ -58,4 +58,10 @@ convert::expect_success "kompose -f $KOMPOSE_ROOT/script/test/fixtures/volume-mo | |||
# openshift test | |||
convert::expect_success "kompose --provider=openshift -f $KOMPOSE_ROOT/script/test/fixtures/volume-mounts/simple-vol-mounts/docker-compose.yml convert --stdout --dc" "$KOMPOSE_ROOT/script/test/fixtures/volume-mounts/simple-vol-mounts/output-os.json" | |||
|
|||
###### | |||
# Tests related to unknown arguments with cli commands | |||
convert::expect_failure "kompose up docker $KOMPOSE_ROOT/script/test/fixtures/unknown-arguments/docker-gitlab.yml" "Unknown Argument docker-gitlab.yml" |
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.
'kompose up docker' I am not sure what that is ? Why do you add docker in that line ?
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.
@sebgoa This might added by mistake, will make the changes.
@@ -203,6 +205,7 @@ func Up(c *cli.Context) { | |||
|
|||
// Down deletes all deployment, svc. | |||
func Down(c *cli.Context) { | |||
CheckForUnknownArgs(c) |
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.
Did you want to update this function and actually use ValidateFlags
as mentioned by @kadel
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.
@sebgoa I'm working on this will update the PR.
61a817d
to
d9d74c6
Compare
c0a09b5
to
685e26d
Compare
685e26d
to
1c30921
Compare
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
Thank you @procrypt
@kadel :) |
looks like merge conflict - need to resolve it. |
Is this merge able now? cc @dustymabe @procrypt @kadel @ngtuna |
@pradeepto Yes it is. |
@kadel I was not aware of that sorry my bad. |
Ah, no don't worry. |
Ah, no don't worry. On Wed, Oct 26, 2016 at 2:25 PM, Abhishek Pratap Singh <
|
Fix #193
cc @kadel @dustymabe @sebgoa @surajssd