summaryrefslogtreecommitdiffhomepage
path: root/control/controlclient/controlclient_test.go
AgeCommit message (Collapse)AuthorFilesLines
2022-05-03control/controlclient: store netinfo and hostinfo separatelyMaisem Ali1-1/+1
Currently, when SetNetInfo is called it sets the value on hostinfo.NetInfo. However, when SetHostInfo is called it overwrites the hostinfo field which may mean it also clears out the NetInfo it had just received. This commit stores NetInfo separately and combines it into Hostinfo as needed so that control is always notified of the latest values. Also, remove unused copies of Hostinfo from ipn.Status and controlclient.Auto. Updates #tailscale/corp#4824 (maybe fixes) Signed-off-by: Maisem Ali <maisem@tailscale.com>
2021-08-20hostinfo: add SetDeviceModel setter, move remaining code from controlclientBrad Fitzpatrick1-7/+0
Updates tailscale/corp#1959 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-05-31ipnlocal: don't assume NeedsLogin immediately after StartLogout().Avery Pennarun1-1/+1
Previously, there was no server round trip required to log out, so when you asked ipnlocal to Logout(), it could clear the netmap immediately and switch to NeedsLogin state. In v1.8, we added a true Logout operation. ipn.Logout() would trigger an async cc.StartLogout() and *also* immediately switch to NeedsLogin. Unfortunately, some frontends would see NeedsLogin and immediately trigger a new StartInteractiveLogin() operation, before the controlclient auth state machine actually acted on the Logout command, thus accidentally invalidating the entire logout operation, retaining the netmap, and violating the user's expectations. Instead, add a new LogoutFinished signal from controlclient (paralleling LoginFinished) and, upon starting a logout, don't update the ipn state machine until it's received. Updates: #1918 (BUG-2) Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2021-04-30controlclient: extract a Client interface and rename Client->Auto.Avery Pennarun1-1/+1
This will let us create a mock or fake Client implementation for use with ipn.Backend. Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
2021-01-08cover one more case in TestStatusEqual.Denton Gentry1-0/+5
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2020-07-27tailcfg, control/controlclient: add GoArch, populate OSVersion on LinuxBrad Fitzpatrick1-0/+7
2020-05-27control/controlclient: move auto_test back to corp repo.David Anderson1-5/+5
It can't run without corp stuff anyway, and makes it harder to refactor the control server.
2020-05-03types/structs: add structs.Incomparable annotation, use it where applicableBrad Fitzpatrick1-1/+3
Shotizam before and output queries: sqlite> select sum(size) from bin where func like 'type..%'; 129067 => 120216
2020-02-14types/empty: add Message, stop using mysterious *struct{}Brad Fitzpatrick1-1/+3
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-02-09Move Linux client & common packages into a public repo.Earl Lee1-0/+68