Browse Source

fix key comparisons in tests

pull/1424/head
Marten Seemann 5 years ago
parent
commit
9cdba6a4cb
  1. 8
      p2p/transport/quic/conn_test.go

8
p2p/transport/quic/conn_test.go

@ -78,11 +78,11 @@ var _ = Describe("Connection", func() {
Expect(conn.LocalPeer()).To(Equal(clientID)) Expect(conn.LocalPeer()).To(Equal(clientID))
Expect(conn.LocalPrivateKey()).To(Equal(clientKey)) Expect(conn.LocalPrivateKey()).To(Equal(clientKey))
Expect(conn.RemotePeer()).To(Equal(serverID)) Expect(conn.RemotePeer()).To(Equal(serverID))
Expect(conn.RemotePublicKey()).To(Equal(serverKey.GetPublic())) Expect(conn.RemotePublicKey().Equals(serverKey.GetPublic())).To(BeTrue())
Expect(serverConn.LocalPeer()).To(Equal(serverID)) Expect(serverConn.LocalPeer()).To(Equal(serverID))
Expect(serverConn.LocalPrivateKey()).To(Equal(serverKey)) Expect(serverConn.LocalPrivateKey()).To(Equal(serverKey))
Expect(serverConn.RemotePeer()).To(Equal(clientID)) Expect(serverConn.RemotePeer()).To(Equal(clientID))
Expect(serverConn.RemotePublicKey()).To(Equal(clientKey.GetPublic())) Expect(serverConn.RemotePublicKey().Equals(clientKey.GetPublic())).To(BeTrue())
}) })
It("handshakes on IPv6", func() { It("handshakes on IPv6", func() {
@ -102,11 +102,11 @@ var _ = Describe("Connection", func() {
Expect(conn.LocalPeer()).To(Equal(clientID)) Expect(conn.LocalPeer()).To(Equal(clientID))
Expect(conn.LocalPrivateKey()).To(Equal(clientKey)) Expect(conn.LocalPrivateKey()).To(Equal(clientKey))
Expect(conn.RemotePeer()).To(Equal(serverID)) Expect(conn.RemotePeer()).To(Equal(serverID))
Expect(conn.RemotePublicKey()).To(Equal(serverKey.GetPublic())) Expect(conn.RemotePublicKey().Equals(serverKey.GetPublic())).To(BeTrue())
Expect(serverConn.LocalPeer()).To(Equal(serverID)) Expect(serverConn.LocalPeer()).To(Equal(serverID))
Expect(serverConn.LocalPrivateKey()).To(Equal(serverKey)) Expect(serverConn.LocalPrivateKey()).To(Equal(serverKey))
Expect(serverConn.RemotePeer()).To(Equal(clientID)) Expect(serverConn.RemotePeer()).To(Equal(clientID))
Expect(serverConn.RemotePublicKey()).To(Equal(clientKey.GetPublic())) Expect(serverConn.RemotePublicKey().Equals(clientKey.GetPublic())).To(BeTrue())
}) })
It("opens and accepts streams", func() { It("opens and accepts streams", func() {

Loading…
Cancel
Save