mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-20 09:57:31 +00:00
ipn: use NodeCapMap in CheckFunnel
These were missed when adding NodeCapMap and resulted in tsnet binaries not being able to turn on funnel. Fixes #9566 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -5,6 +5,7 @@ package ipn
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"tailscale.com/ipn/ipnstate"
|
||||
"tailscale.com/tailcfg"
|
||||
)
|
||||
|
||||
@@ -26,7 +27,11 @@ func TestCheckFunnelAccess(t *testing.T) {
|
||||
{3000, caps(portAttr, tailcfg.CapabilityHTTPS, tailcfg.NodeAttrFunnel), true},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
err := CheckFunnelAccess(tt.port, tt.caps)
|
||||
cm := tailcfg.NodeCapMap{}
|
||||
for _, c := range tt.caps {
|
||||
cm[c] = nil
|
||||
}
|
||||
err := CheckFunnelAccess(tt.port, &ipnstate.PeerStatus{CapMap: cm})
|
||||
switch {
|
||||
case err != nil && tt.wantErr,
|
||||
err == nil && !tt.wantErr:
|
||||
|
Reference in New Issue
Block a user