@@ -1012,26 +1012,13 @@ func TestServeHTTPProxyGrantHeader(t *testing.T) {
10121012func TestServeHTTPProxyGrantHeaderForVIPService (t * testing.T ) {
10131013 b := newTestBackend (t )
10141014
1015- svcIPMapJSON , err := json .Marshal (tailcfg.ServiceIPMappings {
1016- "svc:foo" : {netip .MustParseAddr ("100.101.101.101" )},
1017- })
1018- if err != nil {
1019- t .Fatal (err )
1020- }
1021-
10221015 nm := b .NetMap ()
1023- self := nm .SelfNode .AsStruct ()
1024- self .CapMap = tailcfg.NodeCapMap {
1025- tailcfg .NodeAttrServiceHost : []tailcfg.RawMessage {tailcfg .RawMessage (svcIPMapJSON )},
1026- }
1027- nm .SelfNode = self .View ()
1028-
10291016 matches , err := filter .MatchesFromFilterRules ([]tailcfg.FilterRule {
10301017 {
10311018 SrcIPs : []string {"100.150.151.152" },
10321019 CapGrant : []tailcfg.CapGrant {{
10331020 Dsts : []netip.Prefix {
1034- netip .MustParsePrefix ("100.101.101.101 /32" ),
1021+ netip .MustParsePrefix ("100.150.151.151 /32" ),
10351022 },
10361023 CapMap : tailcfg.PeerCapMap {
10371024 "example.com/cap/interesting" : []tailcfg.RawMessage {
@@ -1044,7 +1031,7 @@ func TestServeHTTPProxyGrantHeaderForVIPService(t *testing.T) {
10441031 SrcIPs : []string {"100.150.151.153" },
10451032 CapGrant : []tailcfg.CapGrant {{
10461033 Dsts : []netip.Prefix {
1047- netip .MustParsePrefix ("100.101.101.101 /32" ),
1034+ netip .MustParsePrefix ("100.150.151.151 /32" ),
10481035 },
10491036 CapMap : tailcfg.PeerCapMap {
10501037 "example.com/cap/boring" : []tailcfg.RawMessage {
0 commit comments