client: send "Complete" event in update checks
Needed in order to match update_engine behavior.
This commit is contained in:
parent
d946c1e7b2
commit
a2f653da34
3 changed files with 25 additions and 1 deletions
|
@ -100,6 +100,15 @@ func TestClientNoUpdate(t *testing.T) {
|
|||
if len(r.checks) != 1 {
|
||||
t.Fatalf("expected 1 update check, not %d", len(r.checks))
|
||||
}
|
||||
|
||||
if len(r.events) != 1 {
|
||||
t.Fatalf("expected 1 event, not %d", len(r.events))
|
||||
}
|
||||
|
||||
if r.events[0].Type != omaha.EventTypeUpdateComplete ||
|
||||
r.events[0].Result != omaha.EventResultSuccessReboot {
|
||||
t.Fatalf("expected %#v, not %#v", EventComplete, r.events[0])
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientWithUpdate(t *testing.T) {
|
||||
|
@ -132,6 +141,15 @@ func TestClientWithUpdate(t *testing.T) {
|
|||
if len(r.checks) != 1 {
|
||||
t.Fatalf("expected 1 update check, not %d", len(r.checks))
|
||||
}
|
||||
|
||||
if len(r.events) != 1 {
|
||||
t.Fatalf("expected 1 event, not %d", len(r.events))
|
||||
}
|
||||
|
||||
if r.events[0].Type != omaha.EventTypeUpdateComplete ||
|
||||
r.events[0].Result != omaha.EventResultSuccessReboot {
|
||||
t.Fatalf("expected %#v, not %#v", EventComplete, r.events[0])
|
||||
}
|
||||
}
|
||||
|
||||
func TestClientPing(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue