mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-14 15:07:55 +00:00
control/controlclient: unexport Status.state, add test-only accessor
Updates #cleanup Updates #1909 Change-Id: I38dcde6fa0de0f58ede4529992cee2e36de33dd6 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
306b85b9a3
commit
9ce1f5c7d2
@@ -21,7 +21,7 @@ func fieldsOf(t reflect.Type) (fields []string) {
|
||||
|
||||
func TestStatusEqual(t *testing.T) {
|
||||
// Verify that the Equal method stays in sync with reality
|
||||
equalHandles := []string{"LoginFinished", "LogoutFinished", "Err", "URL", "NetMap", "State", "Persist"}
|
||||
equalHandles := []string{"LoginFinished", "LogoutFinished", "Err", "URL", "NetMap", "Persist", "state"}
|
||||
if have := fieldsOf(reflect.TypeOf(Status{})); !reflect.DeepEqual(have, equalHandles) {
|
||||
t.Errorf("Status.Equal check might be out of sync\nfields: %q\nhandled: %q\n",
|
||||
have, equalHandles)
|
||||
@@ -52,13 +52,13 @@ func TestStatusEqual(t *testing.T) {
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Status{State: StateNew},
|
||||
&Status{State: StateNew},
|
||||
&Status{state: StateNew},
|
||||
&Status{state: StateNew},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Status{State: StateNew},
|
||||
&Status{State: StateAuthenticated},
|
||||
&Status{state: StateNew},
|
||||
&Status{state: StateAuthenticated},
|
||||
false,
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user