move initialization of the server's transport parameters to the session

This commit is contained in:
Marten Seemann
2019-10-27 15:05:08 +07:00
parent 90643f5756
commit b64535e656
5 changed files with 43 additions and 28 deletions

View File

@@ -104,18 +104,19 @@ var _ = Describe("Session", func() {
Eventually(areSessionsRunning).Should(BeFalse())
sessionRunner = NewMockSessionRunner(mockCtrl)
sessionRunner.EXPECT().GetStatelessResetToken(gomock.Any())
mconn = newMockConnection()
tokenGenerator, err := handshake.NewTokenGenerator()
Expect(err).ToNot(HaveOccurred())
sess = newSession(
mconn,
sessionRunner,
nil,
protocol.ConnectionID{1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
destConnID,
protocol.ConnectionID{1, 2, 3, 4, 5, 6, 7, 8},
populateServerConfig(&Config{}),
nil, // tls.Config
&handshake.TransportParameters{},
tokenGenerator,
utils.DefaultLogger,
protocol.VersionTLS,