You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/tstest
Brad Fitzpatrick e968b0ecd7 cmd/tailscale,controlclient,ipnlocal: fix 'up', deflake tests more
The CLI's "up" is kinda chaotic and LocalBackend.Start is kinda
chaotic and they both need to be redone/deleted (respectively), but
this fixes some buggy behavior meanwhile. We were previously calling
StartLoginInteractive (to start the controlclient's RegisterRequest)
redundantly in some cases, causing test flakes depending on timing and
up's weird state machine.

We only need to call StartLoginInteractive in the client if Start itself
doesn't. But Start doesn't tell us that. So cheat a bit and a put the
information about whether there's a current NodeKey in the ipn.Status.
It used to be accessible over LocalAPI via GetPrefs as a private key but
we removed that for security. But a bool is fine.

So then only call StartLoginInteractive if that bool is false and don't
do it in the WatchIPNBus loop.

Fixes #12028
Updates #12042

Change-Id: I0923c3f704a9d6afd825a858eb9a63ca7c1df294
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 months ago
..
archtest all: cleanup unused code, part 1 (#10661) 11 months ago
deptest tstest/deptest: fix minor escaping error in regex 1 year ago
integration cmd/tailscale,controlclient,ipnlocal: fix 'up', deflake tests more 6 months ago
iosdeps ipn/ipnlocal: add c2n /debug/pprof/allocs endpoint 7 months ago
jsdeps tstest/deptest: add test-only package to unify negative dep tests 1 year ago
natlab all: use Go 1.22 range-over-int 7 months ago
nettest cmd/derper,tstest/nettest: skip network-needing test in airplane mode 6 months ago
tools cmd/k8s-operator,k8s-operator,go.{mod,sum},tstest/tools: add Tailscale Kubernetes operator API docs (#11246) 8 months ago
allocs.go all: update copyright and license headers 2 years ago
clock.go tstime: add Since method (#8622) 1 year ago
clock_test.go all: use Go 1.22 range-over-int 7 months ago
log.go wgengine/magicsock: disable portmapper in tunchan-faked tests 7 months ago
log_test.go all: update copyright and license headers 2 years ago
resource.go all: use Go 1.22 range-over-int 7 months ago
tstest.go ipn/{conffile,ipnlocal}: start booting tailscaled from a config file w/ auth key 1 year ago
tstest_test.go tstest: add method to Replace values for tests 2 years ago