Merge pull request #146 from marineam/fix

fix(update): Fix restart of update-engine
This commit is contained in:
Michael Marineau 2014-06-07 13:04:49 -07:00
commit ef4c3483b6
2 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,8 @@ import (
)
const (
locksmithUnit = "locksmithd.service"
locksmithUnit = "locksmithd.service"
updateEngineUnit = "update-engine.service"
)
// updateOption represents a configurable update option, which, if set, will be
@ -154,7 +155,7 @@ func (uc UpdateConfig) Units(root string) ([]system.Unit, error) {
}
if rue {
ue := system.Unit{
Name: "update-engine",
Name: updateEngineUnit,
Command: "restart",
}
units = append(units, ue)

View File

@ -114,8 +114,8 @@ SERVER=http://foo.com`
t.Errorf("unexpected number of files returned from UpdateConfig: want 1, got %d", len(uu))
} else {
unit := uu[0]
if unit.Name != "update-engine" {
t.Errorf("bad name for generated unit: want update-engine, got %s", unit.Name)
if unit.Name != "update-engine.service" {
t.Errorf("bad name for generated unit: want update-engine.service, got %s", unit.Name)
}
if unit.Command != "restart" {
t.Errorf("bad command for generated unit: want restart, got %s", unit.Command)