Updated review comments :)

pull/2410/head
Sushil Kumar 9 years ago
parent 1fc5f01547
commit b57e69b3a7

@ -21,7 +21,7 @@ const (
Install = "install"
// Delete is executed after the plugin is removed.
Delete = "delete"
// Update is executed after the plugin is removed.
// Update is executed after the plugin is updated.
Update = "update"
)

@ -49,10 +49,10 @@ func Install(i Installer) error {
return i.Install()
}
// Update updates a plugin to $HELM_HOME.
// Update updates a plugin in $HELM_HOME.
func Update(i Installer) error {
if _, pathErr := os.Stat(i.Path()); os.IsNotExist(pathErr) {
return errors.New("plugin does not exists")
return errors.New("plugin does not exist")
}
return i.Update()

@ -107,9 +107,9 @@ func TestVCSInstaller(t *testing.T) {
// Testing update for error
if err := Update(i); err == nil {
t.Error("expected error for plugin does not exists, got none")
} else if err.Error() != "plugin does not exists" {
t.Errorf("expected error for plugin does not exists, got (%v)", err)
t.Error("expected error for plugin does not exist, got none")
} else if err.Error() != "plugin does not exist" {
t.Errorf("expected error for plugin does not exist, got (%v)", err)
}
}
@ -172,9 +172,9 @@ func TestVCSInstallerUpdate(t *testing.T) {
}
if err := Update(i); err == nil {
t.Error("expected error for plugin does not exists, got none")
} else if err.Error() != "plugin does not exists" {
t.Errorf("expected error for plugin does not exists, got (%v)", err)
t.Error("expected error for plugin does not exist, got none")
} else if err.Error() != "plugin does not exist" {
t.Errorf("expected error for plugin does not exist, got (%v)", err)
}
// Install plugin before update

Loading…
Cancel
Save