tstest/natlab/vmtest: start migrating old natlab tests to vmtest (#19727)

Instead of having two entry points for running natlab tests, start
converting the connectivity tests to use the vmtest framework.

Grid and pair tests have yet to be moved over.

Updates #13038

Signed-off-by: Claus Lensbøl <claus@tailscale.com>
This commit is contained in:
Claus Lensbøl
2026-05-13 16:44:53 -04:00
committed by GitHub
parent 3a6261b79b
commit bb47ea2c6b
6 changed files with 298 additions and 328 deletions
+9 -3
View File
@@ -446,13 +446,14 @@ func (e *Env) AddNode(name string, opts ...any) *Node {
return n
}
// LanIP returns the LAN IPv4 address of this node on the given network.
// This is only valid after Env.Start() has been called.
// Name returns the node's name as set in [Env.AddNode].
// Name returns the name of the Node.
func (n *Node) Name() string {
return n.name
}
// LanIP returns the LAN IPv4 address of this node on the given network.
// This is only valid after Env.Start() has been called.
// Name returns the node's name as set in [Env.AddNode].
func (n *Node) LanIP(net *vnet.Network) netip.Addr {
return n.vnetNode.LanIP(net)
}
@@ -1818,3 +1819,8 @@ func (e *Env) PingExpect(from, to *Node, wantRoute PingRoute, timeout time.Durat
}
return fmt.Errorf("ping route = %q, want %q (after %v)", lastRoute, wantRoute, timeout)
}
// NumNodes returns the current number of nodes configured in the env.
func (env *Env) NumNodes() int {
return len(env.nodes)
}