forked from quic-go/quic-go
use IETF QUIC transport error codes
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/internal/protocol"
|
||||
"github.com/lucas-clemente/quic-go/internal/qerr"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
@@ -138,7 +137,7 @@ var _ = Describe("Header Parsing", func() {
|
||||
data, err := ComposeVersionNegotiation(connID, connID, versions)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
_, _, _, err = ParsePacket(data[:len(data)-2], 0)
|
||||
Expect(err).To(MatchError(qerr.InvalidVersionNegotiationPacket))
|
||||
Expect(err).To(MatchError("Version Negotation packet has a version list with an invalid length"))
|
||||
})
|
||||
|
||||
It("errors if the version list is empty", func() {
|
||||
@@ -149,7 +148,7 @@ var _ = Describe("Header Parsing", func() {
|
||||
// remove 8 bytes (two versions), since ComposeVersionNegotiation also added a reserved version number
|
||||
data = data[:len(data)-8]
|
||||
_, _, _, err = ParsePacket(data, 0)
|
||||
Expect(err).To(MatchError("InvalidVersionNegotiationPacket: empty version list"))
|
||||
Expect(err).To(MatchError("Version Negoation packet has empty version list"))
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user