mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
tstest: rename from testy.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
parent
e1526b796e
commit
0038223632
@ -29,13 +29,13 @@
|
||||
"github.com/klauspost/compress/zstd"
|
||||
"github.com/tailscale/wireguard-go/wgcfg"
|
||||
"tailscale.com/tailcfg"
|
||||
"tailscale.com/testy"
|
||||
"tailscale.com/tstest"
|
||||
"tailscale.io/control" // not yet released
|
||||
"tailscale.io/control/cfgdb"
|
||||
)
|
||||
|
||||
func TestTest(t *testing.T) {
|
||||
check := testy.NewResourceCheck()
|
||||
check := tstest.NewResourceCheck()
|
||||
defer check.Assert(t)
|
||||
}
|
||||
|
||||
@ -967,7 +967,7 @@ type server struct {
|
||||
control *control.Server
|
||||
http *httptest.Server
|
||||
clients []*client
|
||||
check *testy.ResourceCheck
|
||||
check *tstest.ResourceCheck
|
||||
segmentMsg chan map[string]interface{}
|
||||
}
|
||||
|
||||
@ -975,10 +975,10 @@ type server struct {
|
||||
|
||||
func newServer(t *testing.T) *server {
|
||||
t.Helper()
|
||||
testy.FixLogs(t)
|
||||
tstest.FixLogs(t)
|
||||
s := &server{
|
||||
t: t,
|
||||
check: testy.NewResourceCheck(),
|
||||
check: tstest.NewResourceCheck(),
|
||||
segmentMsg: make(chan map[string]interface{}, 8),
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
"github.com/tailscale/wireguard-go/tun/tuntest"
|
||||
"tailscale.com/control/controlclient"
|
||||
"tailscale.com/tailcfg"
|
||||
"tailscale.com/testy"
|
||||
"tailscale.com/tstest"
|
||||
"tailscale.com/wgengine"
|
||||
"tailscale.com/wgengine/magicsock"
|
||||
"tailscale.io/control" // not yet released
|
||||
@ -35,8 +35,8 @@ func init() {
|
||||
}
|
||||
|
||||
func TestIPN(t *testing.T) {
|
||||
testy.FixLogs(t)
|
||||
defer testy.UnfixLogs(t)
|
||||
tstest.FixLogs(t)
|
||||
defer tstest.UnfixLogs(t)
|
||||
|
||||
// Turn off STUN for the test to make it hermitic.
|
||||
// TODO(crawshaw): add a test that runs against a local STUN server.
|
||||
@ -46,7 +46,7 @@ func TestIPN(t *testing.T) {
|
||||
// TODO(apenwarr): Make resource checks actually pass.
|
||||
// They don't right now, because (at least) wgengine doesn't fully
|
||||
// shut down.
|
||||
// rc := testy.NewResourceCheck()
|
||||
// rc := tstest.NewResourceCheck()
|
||||
// defer rc.Assert(t)
|
||||
|
||||
var ctl *control.Server
|
||||
|
@ -9,14 +9,14 @@
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"tailscale.com/testy"
|
||||
"tailscale.com/tstest"
|
||||
)
|
||||
|
||||
func TestReadWrite(t *testing.T) {
|
||||
testy.FixLogs(t)
|
||||
defer testy.UnfixLogs(t)
|
||||
tstest.FixLogs(t)
|
||||
defer tstest.UnfixLogs(t)
|
||||
|
||||
rc := testy.NewResourceCheck()
|
||||
rc := tstest.NewResourceCheck()
|
||||
defer rc.Assert(t)
|
||||
|
||||
buf := bytes.Buffer{}
|
||||
@ -62,10 +62,10 @@ func TestReadWrite(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestClientServer(t *testing.T) {
|
||||
testy.FixLogs(t)
|
||||
defer testy.UnfixLogs(t)
|
||||
tstest.FixLogs(t)
|
||||
defer tstest.UnfixLogs(t)
|
||||
|
||||
rc := testy.NewResourceCheck()
|
||||
rc := tstest.NewResourceCheck()
|
||||
defer rc.Assert(t)
|
||||
|
||||
b := &FakeBackend{}
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package testy
|
||||
package tstest
|
||||
|
||||
import (
|
||||
"sync"
|
@ -2,5 +2,5 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// Package testy provides utilities for use in unit tests.
|
||||
package testy
|
||||
// Package tstest provides utilities for use in unit tests.
|
||||
package tstest
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package testy
|
||||
package tstest
|
||||
|
||||
import (
|
||||
"log"
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package testy
|
||||
package tstest
|
||||
|
||||
import (
|
||||
"bytes"
|
@ -15,7 +15,7 @@
|
||||
"time"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"tailscale.com/testy"
|
||||
"tailscale.com/tstest"
|
||||
)
|
||||
|
||||
type noopHijacker struct {
|
||||
@ -63,7 +63,7 @@ func TestStdHandler(t *testing.T) {
|
||||
testErr = errors.New("test error")
|
||||
bgCtx = context.Background()
|
||||
// canceledCtx, cancel = context.WithCancel(bgCtx)
|
||||
clock = testy.Clock{
|
||||
clock = tstest.Clock{
|
||||
Start: time.Now(),
|
||||
Step: time.Second,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user