From c5eee0ea22eea34be9b30385a3adfbdc6d4a0cdd Mon Sep 17 00:00:00 2001 From: Blallo Date: Mon, 1 Apr 2019 16:57:09 +0200 Subject: [PATCH] Fix hub tests. --- hub_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hub_test.go b/hub_test.go index b865910..28ca994 100644 --- a/hub_test.go +++ b/hub_test.go @@ -3,11 +3,12 @@ package circolog import ( "testing" + "git.lattuga.net/boyska/circolog/data" "gopkg.in/mcuadros/go-syslog.v2/format" ) func msg(s string) format.LogParts { - return format.LogParts{"text": s} + return format.LogParts{"content": s} } func hubCount(h Hub) int { @@ -19,10 +20,10 @@ var DefaultClient ClientOptions = ClientOptions{Nofollow: true, BacklogLength: - func hubToArrayOpt(h Hub, opt ClientOptions) []string { r := make([]string, 0) cl := Client{Options: opt} - cl.Messages = make(chan format.LogParts) + cl.Messages = make(chan data.Message) h.Register <- cl for m := range cl.Messages { - r = append(r, m["text"].(string)) + r = append(r, m["msg"].(string)) } return r }