You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/wgengine/wgint/wgint_test.go

27 lines
627 B
Go

// Copyright (c) Tailscale Inc & AUTHORS
// 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)
}
}