From fc4e50bf087e76a4cd3dfa7fced05ec8b2d20239 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 19 Sep 2018 15:54:11 +0200 Subject: [PATCH] Use internal logger to display results info --- reach/reachview_version.go | 2 ++ reach/reachview_version_test.go | 3 --- reach/receiver_upgrade.go | 2 ++ reach/receiver_upgrade_test.go | 5 +---- reach/time_sync.go | 2 ++ reach/time_sync_test.go | 5 +---- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/reach/reachview_version.go b/reach/reachview_version.go index 3bacf46..e56c4a0 100644 --- a/reach/reachview_version.go +++ b/reach/reachview_version.go @@ -42,6 +42,8 @@ func (c *Client) ReachViewVersion() (string, error) { wg.Wait() + c.logf("reachview version result: %v", version) + return version, err } diff --git a/reach/reachview_version_test.go b/reach/reachview_version_test.go index e384019..0704b65 100644 --- a/reach/reachview_version_test.go +++ b/reach/reachview_version_test.go @@ -1,7 +1,6 @@ package reach import ( - "log" "testing" ) @@ -28,8 +27,6 @@ func TestClientReachViewVersion(t *testing.T) { t.Error("version should not be empty") } - log.Printf("reachview version result: %v", version) - defer client.Close() } diff --git a/reach/receiver_upgrade.go b/reach/receiver_upgrade.go index 26fd400..89371bd 100644 --- a/reach/receiver_upgrade.go +++ b/reach/receiver_upgrade.go @@ -42,6 +42,8 @@ func (c *Client) ReceiverUpgradeAvailable() (available bool, running bool, err e wg.Wait() + c.logf("receiver upgrade result: available: %v, running: %v", available, running) + return available, running, err } diff --git a/reach/receiver_upgrade_test.go b/reach/receiver_upgrade_test.go index 3560ef1..bef2677 100644 --- a/reach/receiver_upgrade_test.go +++ b/reach/receiver_upgrade_test.go @@ -1,7 +1,6 @@ package reach import ( - "log" "testing" ) @@ -19,13 +18,11 @@ func TestClientReceiverUpgradeAvailable(t *testing.T) { t.Fatal(err) } - available, running, err := client.ReceiverUpgradeAvailable() + _, _, err := client.ReceiverUpgradeAvailable() if err != nil { t.Error(err) } - log.Printf("receiver upgrade result: available: %v, running: %v", available, running) - defer client.Close() } diff --git a/reach/time_sync.go b/reach/time_sync.go index 37f0378..229d526 100644 --- a/reach/time_sync.go +++ b/reach/time_sync.go @@ -42,6 +42,8 @@ func (c *Client) TimeSyncStatus() (bool, error) { wg.Wait() + c.logf("time sync result: %v", synced) + return synced, err } diff --git a/reach/time_sync_test.go b/reach/time_sync_test.go index 25afa17..7f79497 100644 --- a/reach/time_sync_test.go +++ b/reach/time_sync_test.go @@ -1,7 +1,6 @@ package reach import ( - "log" "testing" ) @@ -19,13 +18,11 @@ func TestClientTimeSync(t *testing.T) { t.Fatal(err) } - synced, err := client.TimeSyncStatus() + _, err := client.TimeSyncStatus() if err != nil { t.Error(err) } - log.Printf("time sync result: %v", synced) - defer client.Close() }