control/controlclient: delete Status.Log{in,out}Finished

They were entirely redundant and 1:1 with the status field
so this turns them into methods instead.

Updates #cleanup
Updates #1909

Change-Id: I7d939750749edf7dae4c97566bbeb99f2f75adbc
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2023-08-30 11:09:36 -07:00
committed by Brad Fitzpatrick
parent 794650fe50
commit 7053e19562
6 changed files with 33 additions and 41 deletions

View File

@@ -19,7 +19,6 @@ import (
"tailscale.com/tailcfg"
"tailscale.com/tsd"
"tailscale.com/tstest"
"tailscale.com/types/empty"
"tailscale.com/types/key"
"tailscale.com/types/logger"
"tailscale.com/types/logid"
@@ -171,9 +170,9 @@ func (cc *mockControl) send(err error, url string, loginFinished bool, nm *netma
Err: err,
}
if loginFinished {
s.LoginFinished = &empty.Message{}
s.SetStateForTest(controlclient.StateAuthenticated)
} else if url == "" && err == nil && nm == nil {
s.LogoutFinished = &empty.Message{}
s.SetStateForTest(controlclient.StateNotAuthenticated)
}
cc.opts.Observer.SetControlClientStatus(s)
}