tstest/natlab/vnet: standardize on 1-based naming of nodes, networks, MACs

We had a mix of 0-based and 1-based nodes and MACs in logs.

Updates #13038

Change-Id: I36d1b00f7f94b37b4ae2cd439bcdc5dbee6eda4d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2024-08-13 08:20:43 -07:00
committed by Brad Fitzpatrick
parent 10d0ce8dde
commit 84adfa1ba3
4 changed files with 57 additions and 17 deletions

View File

@@ -69,3 +69,12 @@ func TestConfig(t *testing.T) {
})
}
}
func TestNodeString(t *testing.T) {
if g, w := (&Node{num: 1}).String(), "node1"; g != w {
t.Errorf("got %q; want %q", g, w)
}
if g, w := (&node{num: 1}).String(), "node1"; g != w {
t.Errorf("got %q; want %q", g, w)
}
}