MCPcopy Create free account
hub / github.com/tailscale/tailscale / MustDown

Method MustDown

tstest/integration/integration.go:916–936  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

914}
915
916func (n *TestNode) MustDown() {
917 t := n.env.t
918 t.Logf("Running down ...")
919 if err := n.Tailscale("down", "--accept-risk=all").Run(); err != nil {
920 t.Fatalf("down: %v", err)
921 }
922
923 // The tailscale down command is asynchronous, so it returns early.
924 // Wait for tailscaled to drop its connection before continuing.
925 if err := tstest.WaitFor(time.Second, func() error {
926 if err := t.Context().Err(); err != nil {
927 return err
928 }
929 if c := n.env.Control.InServeMap(); c != 0 {
930 return fmt.Errorf("%d connections remaining in serve map", c)
931 }
932 return nil
933 }); err != nil {
934 t.Fatalf("tailscale down: %v", err)
935 }
936}
937
938func (n *TestNode) MustLogOut() {
939 t := n.env.t

Callers 3

TestStateSavedOnStartFunction · 0.95
testAutoUpdateDefaultsFunction · 0.95

Calls 9

TailscaleMethod · 0.95
WaitForFunction · 0.92
InServeMapMethod · 0.80
LogfMethod · 0.65
RunMethod · 0.65
FatalfMethod · 0.65
ContextMethod · 0.65
ErrorfMethod · 0.65
ErrMethod · 0.45

Tested by 3

TestStateSavedOnStartFunction · 0.76
testAutoUpdateDefaultsFunction · 0.76