forked from quic-go/quic-go
add the TokenStore to the quic.Config, store received tokens
This commit is contained in:
@@ -444,6 +444,7 @@ var _ = Describe("Client", func() {
|
||||
Context("quic.Config", func() {
|
||||
It("setups with the right values", func() {
|
||||
tracer := quictrace.NewTracer()
|
||||
tokenStore := NewLRUTokenStore(10, 4)
|
||||
config := &Config{
|
||||
HandshakeTimeout: 1337 * time.Minute,
|
||||
IdleTimeout: 42 * time.Hour,
|
||||
@@ -452,6 +453,7 @@ var _ = Describe("Client", func() {
|
||||
ConnectionIDLength: 13,
|
||||
StatelessResetKey: []byte("foobar"),
|
||||
QuicTracer: tracer,
|
||||
TokenStore: tokenStore,
|
||||
}
|
||||
c := populateClientConfig(config, false)
|
||||
Expect(c.HandshakeTimeout).To(Equal(1337 * time.Minute))
|
||||
@@ -461,6 +463,7 @@ var _ = Describe("Client", func() {
|
||||
Expect(c.ConnectionIDLength).To(Equal(13))
|
||||
Expect(c.StatelessResetKey).To(Equal([]byte("foobar")))
|
||||
Expect(c.QuicTracer).To(Equal(tracer))
|
||||
Expect(c.TokenStore).To(Equal(tokenStore))
|
||||
})
|
||||
|
||||
It("errors when the Config contains an invalid version", func() {
|
||||
|
||||
Reference in New Issue
Block a user