improve crypto test coverage

This commit is contained in:
Lucas Clemente
2016-05-30 10:16:25 +02:00
parent 576253ba71
commit b0bc84c5aa
7 changed files with 76 additions and 9 deletions

View File

@@ -33,6 +33,11 @@ var _ = Describe("Source Address Tokens", func() {
Expect(token.ip).To(Equal(net.IP{127, 0, 0, 1}))
Expect(token.timestamp).To(Equal(uint64(0xdeadbeef)))
})
It("rejects tokens of wrong size", func() {
_, err := parseToken(nil)
Expect(err).To(MatchError("invalid STK length: 0"))
})
})
Context("source", func() {