2023-01-27 13:37:20 -08:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-08-29 09:46:26 -07:00
|
|
|
|
|
|
|
package wgint
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2022-12-09 15:12:20 -08:00
|
|
|
"github.com/tailscale/wireguard-go/device"
|
2022-08-29 09:46:26 -07:00
|
|
|
)
|
|
|
|
|
2024-02-25 06:40:35 -08:00
|
|
|
func TestInternalOffsets(t *testing.T) {
|
2022-08-29 09:46:26 -07:00
|
|
|
peer := new(device.Peer)
|
2024-02-28 07:33:15 -08:00
|
|
|
if got := peerLastHandshakeNano(peer); got != 0 {
|
2022-08-29 09:46:26 -07:00
|
|
|
t.Errorf("PeerLastHandshakeNano = %v, want 0", got)
|
|
|
|
}
|
2024-02-28 07:33:15 -08:00
|
|
|
if got := peerRxBytes(peer); got != 0 {
|
2022-08-29 09:46:26 -07:00
|
|
|
t.Errorf("PeerRxBytes = %v, want 0", got)
|
|
|
|
}
|
2024-02-28 07:33:15 -08:00
|
|
|
if got := peerTxBytes(peer); got != 0 {
|
2022-08-29 09:46:26 -07:00
|
|
|
t.Errorf("PeerTxBytes = %v, want 0", got)
|
|
|
|
}
|
2024-02-28 07:33:15 -08:00
|
|
|
if got := peerHandshakeAttempts(peer); got != 0 {
|
2024-02-25 06:40:35 -08:00
|
|
|
t.Errorf("PeerHandshakeAttempts = %v, want 0", got)
|
|
|
|
}
|
2022-08-29 09:46:26 -07:00
|
|
|
}
|