use a sentinel error when a sealer is not yet available

This commit is contained in:
Marten Seemann 2019-11-11 11:51:23 +07:00
parent d00828b762
commit 3db60534cf
5 changed files with 11 additions and 11 deletions

View file

@ -85,9 +85,9 @@ var _ = Describe("Packet Unpacker", func() {
PacketNumberLen: 2,
}
hdr, hdrRaw := getHeader(extHdr)
cs.EXPECT().Get1RTTOpener().Return(nil, handshake.ErrOpenerNotYetAvailable)
cs.EXPECT().Get1RTTOpener().Return(nil, handshake.ErrKeysNotYetAvailable)
_, err := unpacker.Unpack(hdr, time.Now(), append(hdrRaw, payload...))
Expect(err).To(MatchError(handshake.ErrOpenerNotYetAvailable))
Expect(err).To(MatchError(handshake.ErrKeysNotYetAvailable))
})
It("returns the error when unpacking fails", func() {