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

Method AwaitBackendState

tstest/integration/integration.go:1024–1039  ·  view source on GitHub ↗
(state string)

Source from the content-addressed store, hash-verified

1022}
1023
1024func (n *TestNode) AwaitBackendState(state string) {
1025 t := n.env.t
1026 t.Helper()
1027 if err := tstest.WaitFor(20*time.Second, func() error {
1028 st, err := n.Status()
1029 if err != nil {
1030 return err
1031 }
1032 if st.BackendState != state {
1033 return fmt.Errorf("in state %q; want %q", st.BackendState, state)
1034 }
1035 return nil
1036 }); err != nil {
1037 t.Fatalf("failure/timeout waiting for transition to Running status: %v", err)
1038 }
1039}
1040
1041// AwaitNeedsLogin waits for n to reach the IPN state "NeedsLogin".
1042func (n *TestNode) AwaitNeedsLogin() {

Callers 5

TestNodeWithBadStateFileFunction · 0.95
AwaitRunningMethod · 0.95

Calls 5

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