From 3b94eabee3b9695984e6576eb555294fc2f08ef9 Mon Sep 17 00:00:00 2001 From: Dmytro Shynkevych Date: Tue, 5 May 2020 10:13:24 -0400 Subject: [PATCH] control/controlclient: synchronize hostinfo test. Signed-off-by: Dmytro Shynkevych --- control/controlclient/auto_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/control/controlclient/auto_test.go b/control/controlclient/auto_test.go index b04a872a2..f6e34af4f 100644 --- a/control/controlclient/auto_test.go +++ b/control/controlclient/auto_test.go @@ -354,13 +354,14 @@ func TestControl(t *testing.T) { t.Errorf("peer KeepAlive=false, want true") } if peer.Hostinfo.OS != "linux" { - t.Errorf("peer hostinfo does not have OS: %v", peer.Hostinfo) + t.Errorf("peer OS is not linux: %v", peer.Hostinfo) } c4.SetHostinfo(&tailcfg.Hostinfo{ BackendLogID: "set-hostinfo-test", OS: "iOS", }) + c4.waitStatus(t, stateSynchronized) c3NetMap := c3.status(t).New.NetMap c4NetMap = c4.status(t).New.NetMap if len(c3NetMap.Peers) != 1 { @@ -374,14 +375,14 @@ func TestControl(t *testing.T) { t.Errorf("peer KeepAlive=true, want false") } if peer.Hostinfo.OS != "iOS" { - t.Errorf("peer hostinfo does not have OS: %v", peer.Hostinfo) + t.Errorf("peer OS is not iOS: %v", peer.Hostinfo) } peer = c4NetMap.Peers[0] if peer.KeepAlive { t.Errorf("peer KeepAlive=true, want false") } if peer.Hostinfo.OS != "linux" { - t.Errorf("peer hostinfo does not have OS: %v", peer.Hostinfo) + t.Errorf("peer OS is not linux: %v", peer.Hostinfo) } })