mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-20 01:47:33 +00:00
all: remove some Debug fields, NetworkMap.Debug, Reconfig Debug arg
Updates #8923 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
86ad1ea60e
commit
af2e4909b6
@@ -121,7 +121,7 @@ func TestUserspaceEngineReconfig(t *testing.T) {
|
||||
}
|
||||
|
||||
e.SetNetworkMap(nm)
|
||||
err = e.Reconfig(cfg, routerCfg, &dns.Config{}, nil)
|
||||
err = e.Reconfig(cfg, routerCfg, &dns.Config{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -143,6 +143,8 @@ func TestUserspaceEngineReconfig(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestUserspaceEnginePortReconfig(t *testing.T) {
|
||||
tstest.Replace(t, &randomizeClientPort, func() bool { return false })
|
||||
|
||||
flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/2855")
|
||||
const defaultPort = 49983
|
||||
// Keep making a wgengine until we find an unused port
|
||||
@@ -181,13 +183,15 @@ func TestUserspaceEnginePortReconfig(t *testing.T) {
|
||||
},
|
||||
}
|
||||
routerCfg := &router.Config{}
|
||||
if err := ue.Reconfig(cfg, routerCfg, &dns.Config{}, nil); err != nil {
|
||||
if err := ue.Reconfig(cfg, routerCfg, &dns.Config{}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := ue.magicConn.LocalPort(); got != startingPort {
|
||||
t.Errorf("no debug setting changed local port to %d from %d", got, startingPort)
|
||||
}
|
||||
if err := ue.Reconfig(cfg, routerCfg, &dns.Config{}, &tailcfg.Debug{RandomizeClientPort: true}); err != nil {
|
||||
|
||||
randomizeClientPort = func() bool { return true }
|
||||
if err := ue.Reconfig(cfg, routerCfg, &dns.Config{}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if got := ue.magicConn.LocalPort(); got == startingPort {
|
||||
@@ -195,7 +199,8 @@ func TestUserspaceEnginePortReconfig(t *testing.T) {
|
||||
}
|
||||
|
||||
lastPort := ue.magicConn.LocalPort()
|
||||
if err := ue.Reconfig(cfg, routerCfg, &dns.Config{}, nil); err != nil {
|
||||
randomizeClientPort = func() bool { return false }
|
||||
if err := ue.Reconfig(cfg, routerCfg, &dns.Config{}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if startingPort == defaultPort {
|
||||
|
Reference in New Issue
Block a user