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/ipn/ipnlocal
Avery Pennarun b7e31ab1a4 ipn: mock controlclient.Client; big ipn.Backend state machine test.
A very long unit test that verifies the way the controlclient and
ipn.Backend interact.

This is a giant sequential test of the state machine. The test passes,
but only because it's asserting all the wrong behaviour. I marked all
the behaviour I think is wrong with BUG comments, and several
additional test opportunities with TODO.

Note: the new test supercedes TestStartsInNeedsLoginState, which was
checking for incorrect behaviour (although the new test still checks
for the same incorrect behaviour) and assumed .Start() would converge
before returning, which it happens to do, but only for this very
specific case, for the current implementation. You're supposed to wait
for the notifications.

Updates: tailscale/corp#1660

Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
5 years ago
..
local.go controlclient: extract a Client interface and rename Client->Auto. 5 years ago
local_test.go ipn: mock controlclient.Client; big ipn.Backend state machine test. 5 years ago
loglines_test.go tailcfg: add Endpoint, EndpointType, MapRequest.EndpointType 5 years ago
peerapi.go ipn/ipnlocal: always write files to partial files, even in buffered mode 5 years ago
peerapi_macios_ext.go ipn/{ipnlocal,localapi}: add localapi handler to dial/proxy file PUTs 5 years ago
peerapi_test.go ipn/ipnlocal: use delete marker files to work around Windows delete problems 5 years ago
state_test.go ipn: mock controlclient.Client; big ipn.Backend state machine test. 5 years ago