Merge pull request #1627 from lucas-clemente/remove-header-writing-perspective

remove unused perspective from header writing
This commit is contained in:
Marten Seemann 2018-11-26 15:47:00 +07:00 committed by GitHub
commit 8856384b83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 41 additions and 59 deletions

View file

@ -179,15 +179,14 @@ var _ = Describe("Header Parsing", func() {
It("rejects packets sent with an unknown packet type", func() {
srcConnID := protocol.ConnectionID{1, 2, 3, 4, 5, 6, 7, 8}
buf := &bytes.Buffer{}
err := (&Header{
Expect((&Header{
IsLongHeader: true,
Type: 42,
SrcConnectionID: srcConnID,
Version: 0x10203040,
PacketNumber: 1,
PacketNumberLen: protocol.PacketNumberLen1,
}).Write(buf, protocol.PerspectiveClient, protocol.VersionTLS)
Expect(err).ToNot(HaveOccurred())
}).Write(buf, protocol.VersionTLS)).To(Succeed())
b := bytes.NewReader(buf.Bytes())
iHdr, err := ParseInvariantHeader(b, 0)
Expect(err).ToNot(HaveOccurred())