control/controlclient: use structured logging for MapResponse.ControlTime

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2022-02-18 13:00:08 -08:00
committed by Josh Bleecher Snyder
parent 84138450a4
commit 823d970d60
3 changed files with 15 additions and 2 deletions

View File

@@ -149,6 +149,7 @@ func TestCollectPanic(t *testing.T) {
func TestControlTimeLogLine(t *testing.T) {
t.Parallel()
env := newTestEnv(t)
env.LogCatcher.StoreRawJSON()
n := newTestNode(t, env)
n.StartDaemon()
@@ -157,7 +158,7 @@ func TestControlTimeLogLine(t *testing.T) {
n.AwaitRunning()
if err := tstest.WaitFor(20*time.Second, func() error {
const sub = `netmap: control time is 2020-08-03T00:00:00.000000001Z`
const sub = `"controltime":"2020-08-03T00:00:00.000000001Z"`
if !n.env.LogCatcher.logsContains(mem.S(sub)) {
return fmt.Errorf("log catcher didn't see %#q; got %s", sub, n.env.LogCatcher.logsString())
}