mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Update proxy tests to check serialization errors
This commit is contained in:
parent
1d2df3cd71
commit
5e8f9ac538
1 changed files with 4 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue