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
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
..
archtest go.mod: bump netstack for mipsle fix 4 years ago
integration safesocket: add ConnectionStrategy, provide control over fallbacks 4 years ago
natlab fix: typo spelling grammar 4 years ago
staticcheck tstest/staticcheck: import the main package to fix "go mod tidy" 5 years ago
allocs.go util/testingutil: new package with MinAllocsPerRun 4 years ago
clock.go tstest/natlab: add a stateful firewall. 5 years ago
log.go tstest: make MemLogger.String acquire its mutex 4 years ago
log_test.go tstest: rename LogListener to LogLineTracker 5 years ago
resource.go net/dns{,/resolver}: refactor DNS forwarder, send out of right link on macOS/iOS 5 years ago
tstest.go tstest: add WaitFor helper 5 years ago