MCPcopy Index your code
hub / github.com/tailscale/tailscale / TestNodeAddressIPFields

Function TestNodeAddressIPFields

tstest/integration/integration_test.go:991–1016  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

989}
990
991func TestNodeAddressIPFields(t *testing.T) {
992 flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/7008")
993 tstest.Parallel(t)
994 env := NewTestEnv(t)
995 n1 := NewTestNode(t, env)
996 d1 := n1.StartDaemon()
997
998 n1.AwaitListening()
999 n1.MustUp()
1000 n1.AwaitRunning()
1001
1002 testNodes := env.Control.AllNodes()
1003
1004 if len(testNodes) != 1 {
1005 t.Errorf("Expected %d nodes, got %d", 1, len(testNodes))
1006 }
1007 node := testNodes[0]
1008 if len(node.Addresses) == 0 {
1009 t.Errorf("Empty Addresses field in node")
1010 }
1011 if len(node.AllowedIPs) == 0 {
1012 t.Errorf("Empty AllowedIPs field in node")
1013 }
1014
1015 d1.MustCleanShutdown(t)
1016}
1017
1018func TestAddPingRequest(t *testing.T) {
1019 tstest.Parallel(t)

Callers

nothing calls this directly

Calls 11

StartDaemonMethod · 0.95
AwaitListeningMethod · 0.95
MustUpMethod · 0.95
AwaitRunningMethod · 0.95
MarkFunction · 0.92
ParallelFunction · 0.92
NewTestEnvFunction · 0.85
NewTestNodeFunction · 0.85
AllNodesMethod · 0.80
MustCleanShutdownMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…