mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
all: use tstest.Replace more
Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"go4.org/mem"
|
||||
"tailscale.com/tstest"
|
||||
)
|
||||
|
||||
func TestWalkShallowOSSpecific(t *testing.T) {
|
||||
@@ -28,9 +29,7 @@ func TestWalkShallowPortable(t *testing.T) {
|
||||
|
||||
func testWalkShallow(t *testing.T, portable bool) {
|
||||
if portable {
|
||||
old := osWalkShallow
|
||||
defer func() { osWalkShallow = old }()
|
||||
osWalkShallow = nil
|
||||
tstest.Replace(t, &osWalkShallow, nil)
|
||||
}
|
||||
d := t.TempDir()
|
||||
|
||||
|
Reference in New Issue
Block a user