|
|
|
|
@ -188,7 +188,12 @@ func TestHostinfoEqual(t *testing.T) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func TestNodeEqual(t *testing.T) { |
|
|
|
|
nodeHandles := []string{"ID", "Name", "User", "Key", "KeyExpiry", "Machine", "DiscoKey", "Addresses", "AllowedIPs", "Endpoints", "DERP", "Hostinfo", "Created", "LastSeen", "KeepAlive", "MachineAuthorized"} |
|
|
|
|
nodeHandles := []string{ |
|
|
|
|
"ID", "Name", "User", "Sharer", |
|
|
|
|
"Key", "KeyExpiry", "Machine", "DiscoKey", |
|
|
|
|
"Addresses", "AllowedIPs", "Endpoints", "DERP", "Hostinfo", |
|
|
|
|
"Created", "LastSeen", "KeepAlive", "MachineAuthorized", |
|
|
|
|
} |
|
|
|
|
if have := fieldsOf(reflect.TypeOf(Node{})); !reflect.DeepEqual(have, nodeHandles) { |
|
|
|
|
t.Errorf("Node.Equal check might be out of sync\nfields: %q\nhandled: %q\n", |
|
|
|
|
have, nodeHandles) |
|
|
|
|
|