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/integration
Josh Bleecher Snyder 63cd581c3f safesocket: add ConnectionStrategy, provide control over fallbacks
fee2d9fad added support for cmd/tailscale to connect to IPNExtension.
It came in two parts: If no socket was provided, dial IPNExtension first,
and also, if dialing the socket failed, fall back to IPNExtension.

The second half of that support caused the integration tests to fail
when run on a machine that was also running IPNExtension.
The integration tests want to wait until the tailscaled instances
that they spun up are listening. They do that by dialing the new
instance. But when that dial failed, it was falling back to IPNExtension,
so it appeared (incorrectly) that tailscaled was running.
Hilarity predictably ensued.

If a user (or a test) explicitly provides a socket to dial,
it is a reasonable assumption that they have a specific tailscaled
in mind and don't want to fall back to IPNExtension.
It is certainly true of the integration tests.

Instead of adding a bool to Connect, split out the notion of a
connection strategy. For now, the implementation remains the same,
but with the details hidden a bit. Later, we can improve that.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
4 years ago
..
testcontrol tstest/integration/testcontrol: fix data race 4 years ago
vms Replace AWS SDK v1 dependency with v2 4 years ago
gen_deps.go tstest/integration: don't include stdlib deps in go generate output 4 years ago
integration.go tstest/integration: stop leaking zstd.Decoders 4 years ago
integration_test.go safesocket: add ConnectionStrategy, provide control over fallbacks 4 years ago
tailscaled_deps_test_darwin.go net/tsdial: move more weirdo dialing into new tsdial package, plumb 4 years ago
tailscaled_deps_test_freebsd.go net/tsdial: move more weirdo dialing into new tsdial package, plumb 4 years ago
tailscaled_deps_test_linux.go net/tsdial: move more weirdo dialing into new tsdial package, plumb 4 years ago
tailscaled_deps_test_openbsd.go net/tsdial: move more weirdo dialing into new tsdial package, plumb 4 years ago
tailscaled_deps_test_windows.go net/tsdial: move more weirdo dialing into new tsdial package, plumb 4 years ago