Browse Source

tstest/integration/testcontrol: propagate CapVer (#17093)

To support integration testing of client features that rely on it, e.g.
peer relay.

Updates tailscale/corp#30903

Signed-off-by: Jordan Whited <[email protected]>
Jordan Whited 5 months ago
parent
commit
32bfd72752
1 changed files with 2 additions and 0 deletions
  1. 2 0
      tstest/integration/testcontrol/testcontrol.go

+ 2 - 0
tstest/integration/testcontrol/testcontrol.go

@@ -674,6 +674,7 @@ func (s *Server) serveRegister(w http.ResponseWriter, r *http.Request, mkey key.
 			AllowedIPs:        allowedIPs,
 			Hostinfo:          req.Hostinfo.View(),
 			Name:              req.Hostinfo.Hostname,
+			Cap:               req.Version,
 			Capabilities: []tailcfg.NodeCapability{
 				tailcfg.CapabilityHTTPS,
 				tailcfg.NodeAttrFunnel,
@@ -811,6 +812,7 @@ func (s *Server) serveMap(w http.ResponseWriter, r *http.Request, mkey key.Machi
 		endpoints := filterInvalidIPv6Endpoints(req.Endpoints)
 		node.Endpoints = endpoints
 		node.DiscoKey = req.DiscoKey
+		node.Cap = req.Version
 		if req.Hostinfo != nil {
 			node.Hostinfo = req.Hostinfo.View()
 			if ni := node.Hostinfo.NetInfo(); ni.Valid() {