mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-20 01:47:33 +00:00
tailcfg,ipn/ipnlocal: add hostinfo field to replace service entry
Updates tailscale/corp#15437 Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:

committed by
James Tucker

parent
1f4a38ed49
commit
0b6636295e
@@ -17,6 +17,7 @@ import (
|
||||
|
||||
. "tailscale.com/tailcfg"
|
||||
"tailscale.com/types/key"
|
||||
"tailscale.com/types/opt"
|
||||
"tailscale.com/types/ptr"
|
||||
"tailscale.com/util/must"
|
||||
)
|
||||
@@ -64,6 +65,7 @@ func TestHostinfoEqual(t *testing.T) {
|
||||
"Cloud",
|
||||
"Userspace",
|
||||
"UserspaceRouter",
|
||||
"AppConnector",
|
||||
"Location",
|
||||
}
|
||||
if have := fieldsOf(reflect.TypeOf(Hostinfo{})); !reflect.DeepEqual(have, hiHandles) {
|
||||
@@ -228,6 +230,16 @@ func TestHostinfoEqual(t *testing.T) {
|
||||
&Hostinfo{App: "golink"},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Hostinfo{AppConnector: opt.Bool("true")},
|
||||
&Hostinfo{AppConnector: opt.Bool("true")},
|
||||
true,
|
||||
},
|
||||
{
|
||||
&Hostinfo{AppConnector: opt.Bool("true")},
|
||||
&Hostinfo{AppConnector: opt.Bool("false")},
|
||||
false,
|
||||
},
|
||||
}
|
||||
for i, tt := range tests {
|
||||
got := tt.a.Equal(tt.b)
|
||||
|
Reference in New Issue
Block a user