From 7f9ba14b18e171589a82e8dd3bd084ece3405f83 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Wed, 14 Aug 2013 23:43:43 +0000 Subject: [PATCH] Add imagename to LogEvent tests --- api_test.go | 4 ++-- server_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api_test.go b/api_test.go index fb065bb27e..fc7eeed713 100644 --- a/api_test.go +++ b/api_test.go @@ -97,8 +97,8 @@ func TestGetEvents(t *testing.T) { listeners: make(map[string]chan utils.JSONMessage), } - srv.LogEvent("fakeaction", "fakeid") - srv.LogEvent("fakeaction2", "fakeid") + srv.LogEvent("fakeaction", "fakeid", "fakeimage") + srv.LogEvent("fakeaction2", "fakeid", "fakeimage") req, err := http.NewRequest("GET", "/events?since=1", nil) if err != nil { diff --git a/server_test.go b/server_test.go index b7ffbb7e6f..bcf8009f83 100644 --- a/server_test.go +++ b/server_test.go @@ -317,23 +317,23 @@ func TestLogEvent(t *testing.T) { listeners: make(map[string]chan utils.JSONMessage), } - srv.LogEvent("fakeaction", "fakeid") + srv.LogEvent("fakeaction", "fakeid", "fakeimage") listener := make(chan utils.JSONMessage) srv.Lock() srv.listeners["test"] = listener srv.Unlock() - srv.LogEvent("fakeaction2", "fakeid") + srv.LogEvent("fakeaction2", "fakeid", "fakeimage") if len(srv.events) != 2 { t.Fatalf("Expected 2 events, found %d", len(srv.events)) } go func() { time.Sleep(200 * time.Millisecond) - srv.LogEvent("fakeaction3", "fakeid") + srv.LogEvent("fakeaction3", "fakeid", "fakeimage") time.Sleep(200 * time.Millisecond) - srv.LogEvent("fakeaction4", "fakeid") + srv.LogEvent("fakeaction4", "fakeid", "fakeimage") }() setTimeout(t, "Listening for events timed out", 2*time.Second, func() {