mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
tailcfg: make Node.Hostinfo a HostinfoView
Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -346,12 +346,12 @@ func TestPeerAPIBase(t *testing.T) {
|
||||
netaddr.MustParseIPPrefix("100.64.1.2/32"),
|
||||
netaddr.MustParseIPPrefix("fe70::2/128"),
|
||||
},
|
||||
Hostinfo: tailcfg.Hostinfo{
|
||||
Hostinfo: (&tailcfg.Hostinfo{
|
||||
Services: []tailcfg.Service{
|
||||
{Proto: "peerapi4", Port: 444},
|
||||
{Proto: "peerapi6", Port: 666},
|
||||
},
|
||||
},
|
||||
}).View(),
|
||||
},
|
||||
want: "http://100.64.1.2:444",
|
||||
},
|
||||
@@ -367,12 +367,12 @@ func TestPeerAPIBase(t *testing.T) {
|
||||
netaddr.MustParseIPPrefix("100.64.1.2/32"),
|
||||
netaddr.MustParseIPPrefix("fe70::2/128"),
|
||||
},
|
||||
Hostinfo: tailcfg.Hostinfo{
|
||||
Hostinfo: (&tailcfg.Hostinfo{
|
||||
Services: []tailcfg.Service{
|
||||
{Proto: "peerapi4", Port: 444},
|
||||
{Proto: "peerapi6", Port: 666},
|
||||
},
|
||||
},
|
||||
}).View(),
|
||||
},
|
||||
want: "http://[fe70::2]:666",
|
||||
},
|
||||
@@ -389,11 +389,11 @@ func TestPeerAPIBase(t *testing.T) {
|
||||
netaddr.MustParseIPPrefix("100.64.1.2/32"),
|
||||
netaddr.MustParseIPPrefix("fe70::2/128"),
|
||||
},
|
||||
Hostinfo: tailcfg.Hostinfo{
|
||||
Hostinfo: (&tailcfg.Hostinfo{
|
||||
Services: []tailcfg.Service{
|
||||
{Proto: "peerapi4", Port: 444},
|
||||
},
|
||||
},
|
||||
}).View(),
|
||||
},
|
||||
want: "http://100.64.1.2:444",
|
||||
},
|
||||
@@ -410,11 +410,11 @@ func TestPeerAPIBase(t *testing.T) {
|
||||
netaddr.MustParseIPPrefix("100.64.1.2/32"),
|
||||
netaddr.MustParseIPPrefix("fe70::2/128"),
|
||||
},
|
||||
Hostinfo: tailcfg.Hostinfo{
|
||||
Hostinfo: (&tailcfg.Hostinfo{
|
||||
Services: []tailcfg.Service{
|
||||
{Proto: "peerapi6", Port: 666},
|
||||
},
|
||||
},
|
||||
}).View(),
|
||||
},
|
||||
want: "http://[fe70::2]:666",
|
||||
},
|
||||
|
Reference in New Issue
Block a user