2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-08-29 17:46:26 +01:00
|
|
|
|
|
|
|
package wgint
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-12-09 23:12:20 +00:00
|
|
|
"github.com/tailscale/wireguard-go/device"
|
2022-08-29 17:46:26 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestPeerStats(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)
|
|
|
|
}
|
|
|
|
}
|