commit 5e8f9ac538002ef9d7ec195ccbcd51401755c657
Author: Cecylia Bocovich <cohosh(a)torproject.org>
Date: Tue Apr 28 13:01:32 2020 -0400
Update proxy tests to check serialization errors
---
proxy/proxy-go_test.go | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/proxy/proxy-go_test.go b/proxy/proxy-go_test.go
index bed00f2..03d7307 100644
--- a/proxy/proxy-go_test.go
+++ b/proxy/proxy-go_test.go
@@ -198,7 +198,7 @@ func TestSessionDescriptions(t *testing.T) {
},
},
} {
- desc := util.DeserializeSessionDescription(test.msg)
+ desc, _ := util.DeserializeSessionDescription(test.msg)
So(desc, ShouldResemble, test.ret)
}
})
@@ -215,8 +215,9 @@ func TestSessionDescriptions(t *testing.T) {
`{"type":"offer","sdp":"test"}`,
},
} {
- msg := util.SerializeSessionDescription(test.desc)
+ msg, err := util.SerializeSessionDescription(test.desc)
So(msg, ShouldResemble, test.ret)
+ So(err, ShouldBeNil)
}
})
}
@@ -240,7 +241,7 @@ func TestBrokerInteractions(t *testing.T) {
},
}
pc, _ := webrtc.NewPeerConnection(config)
- offer := util.DeserializeSessionDescription(sampleOffer)
+ offer, _ := util.DeserializeSessionDescription(sampleOffer)
pc.SetRemoteDescription(*offer)
answer, _ := pc.CreateAnswer(nil)
pc.SetLocalDescription(answer)