2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2022-02-24 22:26:08 +00:00
|
|
|
|
|
|
|
package main // import "tailscale.com/cmd/tailscaled"
|
|
|
|
|
2023-07-21 01:26:52 +00:00
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"tailscale.com/tstest/deptest"
|
|
|
|
)
|
2022-02-24 22:26:08 +00:00
|
|
|
|
|
|
|
func TestNothing(t *testing.T) {
|
|
|
|
// This test does nothing on purpose, so we can run
|
|
|
|
// GODEBUG=memprofilerate=1 go test -v -run=Nothing -memprofile=prof.mem
|
|
|
|
// without any errors about no matching tests.
|
|
|
|
}
|
2023-07-21 01:26:52 +00:00
|
|
|
|
|
|
|
func TestDeps(t *testing.T) {
|
|
|
|
deptest.DepChecker{
|
|
|
|
GOOS: "darwin",
|
|
|
|
GOARCH: "arm64",
|
|
|
|
BadDeps: map[string]string{
|
2024-05-24 06:13:32 +00:00
|
|
|
"testing": "do not use testing package in production code",
|
2023-07-21 03:36:12 +00:00
|
|
|
"gvisor.dev/gvisor/pkg/hostarch": "will crash on non-4K page sizes; see https://github.com/tailscale/tailscale/issues/8658",
|
2023-07-21 01:26:52 +00:00
|
|
|
},
|
|
|
|
}.Check(t)
|
|
|
|
|
|
|
|
deptest.DepChecker{
|
2023-07-21 03:36:12 +00:00
|
|
|
GOOS: "linux",
|
|
|
|
GOARCH: "arm64",
|
2023-07-21 01:26:52 +00:00
|
|
|
BadDeps: map[string]string{
|
2024-05-24 06:13:32 +00:00
|
|
|
"testing": "do not use testing package in production code",
|
2023-07-21 03:36:12 +00:00
|
|
|
"gvisor.dev/gvisor/pkg/hostarch": "will crash on non-4K page sizes; see https://github.com/tailscale/tailscale/issues/8658",
|
2023-07-21 01:26:52 +00:00
|
|
|
},
|
|
|
|
}.Check(t)
|
|
|
|
}
|