tsnet: use tstest.Shard in new tsnet tests

This helps us distribute tests across CI runners. Most tsnet tests call
tstest.Shard, but two recently added tests do not: tsnet.TestFunnelClose
and tsnet.TestListenService. This commit resolves the oversight.

Fixes tailscale/corp#36242

Signed-off-by: Harry Harpham <harry@tailscale.com>
main
Harry Harpham 3 months ago
parent a57c6457c9
commit 47ef1a95db
  1. 4
      tsnet/tsnet_test.go

@ -846,6 +846,8 @@ func TestFunnel(t *testing.T) {
// after itself when closed. Specifically, changes made to the serve config
// should be cleared.
func TestFunnelClose(t *testing.T) {
tstest.Shard(t)
marshalServeConfig := func(t *testing.T, sc ipn.ServeConfigView) string {
t.Helper()
return string(must.Get(json.MarshalIndent(sc, "", "\t")))
@ -942,6 +944,8 @@ func TestFunnelClose(t *testing.T) {
}
func TestListenService(t *testing.T) {
tstest.Shard(t)
// First test an error case which doesn't require all of the fancy setup.
t.Run("untagged_node_error", func(t *testing.T) {
ctx := t.Context()

Loading…
Cancel
Save