Refactor RDP proxy handling and update related tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package fabricproto
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
@@ -36,6 +37,9 @@ func TestHandleFrameOpensStreamAndReceivesData(t *testing.T) {
|
||||
if len(responses) != 1 || responses[0].Type != FrameAck || responses[0].StreamID != 7 || responses[0].Sequence != 11 {
|
||||
t.Fatalf("responses = %+v, want ack for stream 7 seq 11", responses)
|
||||
}
|
||||
if !bytes.Equal(responses[0].Payload, DataAckPayload([]byte("rdp-input"))) {
|
||||
t.Fatalf("ack checksum = %x, want sha256 payload checksum", responses[0].Payload)
|
||||
}
|
||||
snapshot := session.Snapshot()
|
||||
if snapshot.FramesReceived != 1 || snapshot.Streams[7].Received != 1 {
|
||||
t.Fatalf("received metrics = %+v stream=%+v", snapshot, snapshot.Streams[7])
|
||||
|
||||
Reference in New Issue
Block a user