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

Function TestControlTimeLogLine

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

Source from the content-addressed store, hash-verified

242}
243
244func TestControlTimeLogLine(t *testing.T) {
245 tstest.Parallel(t)
246 env := NewTestEnv(t)
247 env.LogCatcher.StoreRawJSON()
248 n := NewTestNode(t, env)
249
250 n.StartDaemon()
251 n.AwaitResponding()
252 n.MustUp()
253 n.AwaitRunning()
254
255 if err := tstest.WaitFor(20*time.Second, func() error {
256 const sub = `"controltime":"2020-08-03T00:00:00.000000001Z"`
257 if !n.env.LogCatcher.logsContains(mem.S(sub)) {
258 return fmt.Errorf("log catcher didn't see %#q; got %s", sub, n.env.LogCatcher.logsString())
259 }
260 return nil
261 }); err != nil {
262 t.Fatal(err)
263 }
264}
265
266// test Issue 2321: Start with UpdatePrefs should save prefs to disk
267func TestStateSavedOnStart(t *testing.T) {

Callers

nothing calls this directly

Calls 13

StartDaemonMethod · 0.95
AwaitRespondingMethod · 0.95
MustUpMethod · 0.95
AwaitRunningMethod · 0.95
ParallelFunction · 0.92
WaitForFunction · 0.92
NewTestEnvFunction · 0.85
NewTestNodeFunction · 0.85
StoreRawJSONMethod · 0.80
logsContainsMethod · 0.80
logsStringMethod · 0.80
ErrorfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…