-
Notifications
You must be signed in to change notification settings - Fork 324
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 new ioctl alias remove command and test #1843
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1843 +/- ##
=======================================
Coverage 56.51% 56.51%
=======================================
Files 167 167
Lines 13852 13852
=======================================
Hits 7828 7828
Misses 5020 5020
Partials 1004 1004 Continue to review full report at Codecov.
|
} | ||
client.EXPECT().Config().Return(cfg).AnyTimes() | ||
cmd := NewAliasRemove(client) | ||
res, err := util.ExecuteCmd(cmd, "a") |
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.
incomplete unit test: how do you verify that the corresponding alias has been removed?
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.
@CoderZhi
supplementary test
…nto feature/add_new_cmd
if err := ioutil.WriteFile(config.DefaultConfigFile, out, 0600); err != nil { | ||
return output.NewError(output.WriteFileError, fmt.Sprintf(writeError, config.DefaultConfigFile), err) | ||
} |
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.
it would better if we can move these lines into client
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.
@CoderZhi
Does it mean adding a new method on the client?
E.g:
type Client interface {
SaveConfig(cfg config.Config) error
}
#1771
@CoderZhi