рабочий вариант, но скороть 10 МБит
This commit is contained in:
@@ -95,7 +95,7 @@ func TestGatewayRunClosesPacketTransportOnRuntimeError(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGatewayNormalizeRejectsBackendPacketRelayFallback(t *testing.T) {
|
||||
func TestGatewayNormalizeRequiresFabricPacketTransport(t *testing.T) {
|
||||
gateway := &Gateway{
|
||||
API: nil,
|
||||
ClusterID: "cluster-1",
|
||||
@@ -106,7 +106,7 @@ func TestGatewayNormalizeRejectsBackendPacketRelayFallback(t *testing.T) {
|
||||
if err == nil {
|
||||
t.Fatal("normalize succeeded without a fabric packet transport")
|
||||
}
|
||||
if got, want := err.Error(), "fabric packet transport is required; backend packet relay fallback is disabled"; got != want {
|
||||
if got, want := err.Error(), "fabric packet transport is required"; got != want {
|
||||
t.Fatalf("normalize error = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,7 @@ func TestGatewaySnapshotReportsIPv4EgressServiceAdapter(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGatewayUploadPrioritizesTCPControlPackets(t *testing.T) {
|
||||
t.Skip("retired: base VPN gateway uploads opaque packet batches without TCP control prioritization")
|
||||
transport := &recordingGatewayTransport{}
|
||||
gateway := &Gateway{Transport: transport, VPNConnectionID: "vpn-1"}
|
||||
priorityPackets := make(chan []byte, 1)
|
||||
@@ -160,6 +161,7 @@ func TestGatewayUploadPrioritizesTCPControlPackets(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestGatewayUploadPreemptsPendingNormalBatchForTCPControlPackets(t *testing.T) {
|
||||
t.Skip("retired: base VPN gateway preserves packet batch order instead of preempting by TCP flags")
|
||||
transport := &recordingGatewayTransport{}
|
||||
gateway := &Gateway{Transport: transport, VPNConnectionID: "vpn-1"}
|
||||
priorityPackets := make(chan []byte, 1)
|
||||
@@ -201,6 +203,7 @@ func TestGatewayUploadPreemptsPendingNormalBatchForTCPControlPackets(t *testing.
|
||||
}
|
||||
|
||||
func TestGatewayUploadMicroBatchesTCPControlPackets(t *testing.T) {
|
||||
t.Skip("retired: base VPN gateway no longer creates protocol-specific TCP control microbatches")
|
||||
transport := &recordingGatewayTransport{}
|
||||
gateway := &Gateway{Transport: transport, VPNConnectionID: "vpn-1"}
|
||||
priorityPackets := make(chan []byte, 2)
|
||||
@@ -239,18 +242,3 @@ func TestGatewayUploadMicroBatchesTCPControlPackets(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsTCPControlPacket(t *testing.T) {
|
||||
packet := testIPv4TCPPacket([4]byte{192, 168, 200, 95}, [4]byte{10, 77, 0, 2}, 3389, 51000)
|
||||
if isTCPControlPacket(packet) {
|
||||
t.Fatal("packet without control flags was classified as control")
|
||||
}
|
||||
packet[33] = 0x12
|
||||
if !isTCPControlPacket(packet) {
|
||||
t.Fatal("tcp syn-ack was not classified as control")
|
||||
}
|
||||
packet[9] = 17
|
||||
if isTCPControlPacket(packet) {
|
||||
t.Fatal("udp packet was classified as tcp control")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user