mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-23 09:06:24 +00:00
tstest/integration{/testcontrol}: add peer relay integration test (#17103)
Updates tailscale/corp#30903 Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
@@ -480,11 +480,13 @@ func (lc *LogCatcher) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
// TestEnv contains the test environment (set of servers) used by one
|
||||
// or more nodes.
|
||||
type TestEnv struct {
|
||||
t testing.TB
|
||||
tunMode bool
|
||||
cli string
|
||||
daemon string
|
||||
loopbackPort *int
|
||||
t testing.TB
|
||||
tunMode bool
|
||||
cli string
|
||||
daemon string
|
||||
loopbackPort *int
|
||||
neverDirectUDP bool
|
||||
relayServerUseLoopback bool
|
||||
|
||||
LogCatcher *LogCatcher
|
||||
LogCatcherServer *httptest.Server
|
||||
@@ -842,6 +844,12 @@ func (n *TestNode) StartDaemonAsIPNGOOS(ipnGOOS string) *Daemon {
|
||||
if n.env.loopbackPort != nil {
|
||||
cmd.Env = append(cmd.Env, "TS_DEBUG_NETSTACK_LOOPBACK_PORT="+strconv.Itoa(*n.env.loopbackPort))
|
||||
}
|
||||
if n.env.neverDirectUDP {
|
||||
cmd.Env = append(cmd.Env, "TS_DEBUG_NEVER_DIRECT_UDP=1")
|
||||
}
|
||||
if n.env.relayServerUseLoopback {
|
||||
cmd.Env = append(cmd.Env, "TS_DEBUG_RELAY_SERVER_ADDRS=::1,127.0.0.1")
|
||||
}
|
||||
if version.IsRace() {
|
||||
cmd.Env = append(cmd.Env, "GORACE=halt_on_error=1")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user