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

Method AwaitNeedsLogin

tstest/integration/integration.go:1042–1057  ·  view source on GitHub ↗

AwaitNeedsLogin waits for n to reach the IPN state "NeedsLogin".

()

Source from the content-addressed store, hash-verified

1040
1041// AwaitNeedsLogin waits for n to reach the IPN state "NeedsLogin".
1042func (n *TestNode) AwaitNeedsLogin() {
1043 t := n.env.t
1044 t.Helper()
1045 if err := tstest.WaitFor(20*time.Second, func() error {
1046 st, err := n.Status()
1047 if err != nil {
1048 return err
1049 }
1050 if st.BackendState != "NeedsLogin" {
1051 return fmt.Errorf("in state %q", st.BackendState)
1052 }
1053 return nil
1054 }); err != nil {
1055 t.Fatalf("failure/timeout waiting for transition to NeedsLogin status: %v", err)
1056 }
1057}
1058
1059func (n *TestNode) TailscaleForOutput(arg ...string) *exec.Cmd {
1060 cmd := n.Tailscale(arg...)

Callers 1

TestOneNodeExpiredKeyFunction · 0.95

Calls 5

StatusMethod · 0.95
WaitForFunction · 0.92
HelperMethod · 0.65
ErrorfMethod · 0.65
FatalfMethod · 0.65

Tested by 1

TestOneNodeExpiredKeyFunction · 0.76