X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=daemon_test.go;h=ac9bc4cfc3ec5c8ac351db2fe961134b6c98fc31;hb=8702ace766119effc2c2ec4afa284bec6f24c4da;hp=9c9db3de436923a43540debbc7d582374db58a43;hpb=41f96494948d1f9f1e0c3066099e0bd9ad0ee8dd;p=goircd.git diff --git a/daemon_test.go b/daemon_test.go index 9c9db3d..ac9bc4c 100644 --- a/daemon_test.go +++ b/daemon_test.go @@ -25,11 +25,12 @@ import ( ) func TestRegistrationWorkflow(t *testing.T) { - daemon := NewDaemon("foohost", "", nil, nil) + host := "foohost" + daemon := NewDaemon("ver1", &host, nil, nil, nil, nil) events := make(chan ClientEvent) go daemon.Processor(events) conn := NewTestingConn() - client := NewClient("foohost", conn) + client := NewClient(&host, conn) go client.Processor(events) conn.inbound <- "UNEXISTENT CMD" // should recieve nothing on this @@ -119,8 +120,10 @@ func TestMotd(t *testing.T) { fd.WriteString("catched\n") conn := NewTestingConn() - client := NewClient("foohost", conn) - daemon := NewDaemon("foohost", fd.Name(), nil, nil) + host := "foohost" + client := NewClient(&host, conn) + motdName := fd.Name() + daemon := NewDaemon("ver1", &host, &motdName, nil, nil, nil) daemon.SendMotd(client) if r := <-conn.outbound; !strings.HasPrefix(r, ":foohost 375") {