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

Tests fail in servertls_test.go #83

Open fmaylinch opened 2 years ago

fmaylinch commented 2 years ago

Problem with certs:

panic: x509: certificate relies on legacy Common Name field, use SANs instead

goroutine 36 [running]:
gopkg.in/mcuadros/go-syslog%2ev2.(*ServerSuite).TestTLS.func1(0x0)
        /-S/vendor/gopkg.in/mcuadros/go-syslog.v2/servertls_test.go:69 +0x148
created by gopkg.in/mcuadros/go-syslog%2ev2.(*ServerSuite).TestTLS
        /-S/vendor/gopkg.in/mcuadros/go-syslog.v2/servertls_test.go:65 +0x13c

Problem with server being killed too soon:

/-S/vendor/gopkg.in/mcuadros/go-syslog.v2/servertls_test.go:80:
... obtained = nil
... expected string = "hostname"
/-S/vendor/gopkg.in/mcuadros/go-syslog.v2/servertls_test.go:81:
... obtained = nil
... expected string = "tag"
/-S/vendor/gopkg.in/mcuadros/go-syslog.v2/servertls_test.go:82:
... obtained = nil
... expected string = "content"
/-S/vendor/gopkg.in/mcuadros/go-syslog.v2/servertls_test.go:83:
... obtained = nil
... expected string = "dummycert1"
/-S/vendor/gopkg.in/mcuadros/go-syslog.v2/servertls_test.go:84:
... obtained int64 = 0
... expected int64 = 46

I added 2 commits here, to fix it: https://github.com/fmaylinch/go-syslog