forked from quic-go/quic-go
reenable the version negotiation integration tests
This commit is contained in:
@@ -51,10 +51,18 @@ var _ = Describe("Handshake tests", func() {
|
||||
}
|
||||
|
||||
Context("Version Negotiation", func() {
|
||||
var supportedVersions []protocol.VersionNumber
|
||||
|
||||
BeforeEach(func() {
|
||||
supportedVersions = protocol.SupportedVersions
|
||||
protocol.SupportedVersions = append(protocol.SupportedVersions, []protocol.VersionNumber{7, 8, 9, 10}...)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
protocol.SupportedVersions = supportedVersions
|
||||
})
|
||||
|
||||
It("when the server supports more versions than the client", func() {
|
||||
if len(protocol.SupportedVersions) == 1 {
|
||||
Skip("Test requires at least 2 supported versions.")
|
||||
}
|
||||
// the server doesn't support the highest supported version, which is the first one the client will try
|
||||
// but it supports a bunch of versions that the client doesn't speak
|
||||
serverConfig.Versions = []protocol.VersionNumber{protocol.SupportedVersions[1], 7, 8, 9}
|
||||
@@ -64,9 +72,6 @@ var _ = Describe("Handshake tests", func() {
|
||||
})
|
||||
|
||||
It("when the client supports more versions than the server supports", func() {
|
||||
if len(protocol.SupportedVersions) == 1 {
|
||||
Skip("Test requires at least 2 supported versions.")
|
||||
}
|
||||
// the server doesn't support the highest supported version, which is the first one the client will try
|
||||
// but it supports a bunch of versions that the client doesn't speak
|
||||
runServer()
|
||||
|
||||
Reference in New Issue
Block a user