mcuadros / go-syslog

Syslog server library for go.
http://godoc.org/gopkg.in/mcuadros/go-syslog.v2
MIT License
523 stars 143 forks source link

Test failure with Golang 1.13 #64

Open eclipseo opened 5 years ago

eclipseo commented 5 years ago

Go 1.13 on Fedora Rawhide:

Testing    in: /builddir/build/BUILD/go-syslog-a127d826d6c27489d377b3c080bd256d8f8093a6/_build/src
         PATH: /builddir/build/BUILD/go-syslog-a127d826d6c27489d377b3c080bd256d8f8093a6/_build/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin
       GOPATH: /builddir/build/BUILD/go-syslog-a127d826d6c27489d377b3c080bd256d8f8093a6/_build:/usr/share/gocode
  GO111MODULE: off
      command: go test -buildmode pie -compiler gc -ldflags "-X gopkg.in/mcuadros/go-syslog.v2/version=2.2.1 -X gopkg.in/mcuadros/go-syslog.v2/version.commit=a127d826d6c27489d377b3c080bd256d8f8093a6 -extldflags '-Wl,-z,relro -Wl,--as-needed  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '"
      testing: gopkg.in/mcuadros/go-syslog.v2
gopkg.in/mcuadros/go-syslog.v2
----------------------------------------------------------------------
FAIL: servertls_test.go:57: ServerSuite.TestTLS
servertls_test.go:80:
    c.Check(handler.LastLogParts["hostname"], Equals, "hostname")
... obtained = nil
... expected string = "hostname"
... runtime error: invalid memory address or nil pointer dereference
servertls_test.go:81:
    c.Check(handler.LastLogParts["tag"], Equals, "tag")
... obtained = nil
... expected string = "tag"
... runtime error: invalid memory address or nil pointer dereference
servertls_test.go:82:
    c.Check(handler.LastLogParts["content"], Equals, "content")
... obtained = nil
... expected string = "content"
... runtime error: invalid memory address or nil pointer dereference
servertls_test.go:83:
    c.Check(handler.LastLogParts["tls_peer"], Equals, "dummycert1")
... obtained = nil
... expected string = "dummycert1"
... runtime error: invalid memory address or nil pointer dereference
servertls_test.go:84:
    c.Check(handler.LastMessageLength, Equals, int64(len(exampleSyslog)))
... obtained int64 = 0
... expected int64 = 46
OOPS: 14 passed, 1 FAILED
--- FAIL: Test (2.40s)
FAIL
exit status 1
FAIL    gopkg.in/mcuadros/go-syslog.v2  2.406s
eclipseo commented 5 years ago

It seems to be related to TLS 1.3 being the default, by disabling TLS 1.3 the test passes. Problem is the option to disable TLS 1.3 will be removed in Golang 1.14.

eclipseo commented 4 years ago

Golang 1.14 is here and the tests are still failing.