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
|
|
|
)
|
|
|
|
|
2024-02-25 14:40:35 +00:00
|
|
|
func TestInternalOffsets(t *testing.T) {
|
2022-08-29 17:46:26 +01:00
|
|
|
peer := new(device.Peer)
|
2024-02-28 15:33:15 +00:00
|
|
|
if got := peerLastHandshakeNano(peer); got != 0 {
|
2022-08-29 17:46:26 +01:00
|
|
|
t.Errorf("PeerLastHandshakeNano = %v, want 0", got)
|
|
|
|
}
|
2024-02-28 15:33:15 +00:00
|
|
|
if got := peerRxBytes(peer); got != 0 {
|
2022-08-29 17:46:26 +01:00
|
|
|
t.Errorf("PeerRxBytes = %v, want 0", got)
|
|
|
|
}
|
2024-02-28 15:33:15 +00:00
|
|
|
if got := peerTxBytes(peer); got != 0 {
|
2022-08-29 17:46:26 +01:00
|
|
|
t.Errorf("PeerTxBytes = %v, want 0", got)
|
|
|
|
}
|
2024-02-28 15:33:15 +00:00
|
|
|
if got := peerHandshakeAttempts(peer); got != 0 {
|
2024-02-25 14:40:35 +00:00
|
|
|
t.Errorf("PeerHandshakeAttempts = %v, want 0", got)
|
|
|
|
}
|
2022-08-29 17:46:26 +01:00
|
|
|
}
|