|
|
@ -24,8 +24,8 @@ func fieldsOf(t reflect.Type) (fields []string) {
|
|
|
|
func TestHostinfoEqual(t *testing.T) {
|
|
|
|
func TestHostinfoEqual(t *testing.T) {
|
|
|
|
hiHandles := []string{
|
|
|
|
hiHandles := []string{
|
|
|
|
"IPNVersion", "FrontendLogID", "BackendLogID", "OS", "OSVersion",
|
|
|
|
"IPNVersion", "FrontendLogID", "BackendLogID", "OS", "OSVersion",
|
|
|
|
"DeviceModel", "Hostname", "GoArch", "RoutableIPs", "RequestTags", "Services",
|
|
|
|
"DeviceModel", "Hostname", "ShieldsUp", "GoArch", "RoutableIPs",
|
|
|
|
"NetInfo",
|
|
|
|
"RequestTags", "Services", "NetInfo",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if have := fieldsOf(reflect.TypeOf(Hostinfo{})); !reflect.DeepEqual(have, hiHandles) {
|
|
|
|
if have := fieldsOf(reflect.TypeOf(Hostinfo{})); !reflect.DeepEqual(have, hiHandles) {
|
|
|
|
t.Errorf("Hostinfo.Equal check might be out of sync\nfields: %q\nhandled: %q\n",
|
|
|
|
t.Errorf("Hostinfo.Equal check might be out of sync\nfields: %q\nhandled: %q\n",
|
|
|
|