You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
632 B
26 lines
632 B
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package wgint
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/tailscale/wireguard-go/device"
|
|
)
|
|
|
|
func TestInternalOffsets(t *testing.T) {
|
|
peer := new(device.Peer)
|
|
if got := peerLastHandshakeNano(peer); got != 0 {
|
|
t.Errorf("PeerLastHandshakeNano = %v, want 0", got)
|
|
}
|
|
if got := peerRxBytes(peer); got != 0 {
|
|
t.Errorf("PeerRxBytes = %v, want 0", got)
|
|
}
|
|
if got := peerTxBytes(peer); got != 0 {
|
|
t.Errorf("PeerTxBytes = %v, want 0", got)
|
|
}
|
|
if got := peerHandshakeAttempts(peer); got != 0 {
|
|
t.Errorf("PeerHandshakeAttempts = %v, want 0", got)
|
|
}
|
|
}
|
|
|