diff --git a/example/updater/main.go b/example/updater/main.go index b2b944f..54d685a 100644 --- a/example/updater/main.go +++ b/example/updater/main.go @@ -101,7 +101,7 @@ func configureWifi() { } log.Println("connecting module to wifi network") - if err := updater.ConnectToWifiNetwork(ssid, true); err != nil { + if err := updater.JoinWifiNetwork(ssid, true); err != nil { log.Fatal(err) } log.Printf("you can now switch to the wifi network and start phase '%s'", phaseUpdateThenReboot) diff --git a/reach/wifi_networks.go b/reach/wifi_networks.go index b69d7fd..eac96c0 100644 --- a/reach/wifi_networks.go +++ b/reach/wifi_networks.go @@ -136,8 +136,8 @@ func (u *Updater) RemoveWifiNetwork(ssid string) (bool, error) { } -// ConnectToWifiNetwork asks the ReachRS module to connect to the given WiFi network -func (u *Updater) ConnectToWifiNetwork(ssid string, waitDisconnect bool) error { +// JoinWifiNetwork asks the ReachRS module to join the given WiFi network +func (u *Updater) JoinWifiNetwork(ssid string, waitDisconnect bool) error { var err error var wg sync.WaitGroup diff --git a/reach/wifi_networks_test.go b/reach/wifi_networks_test.go index 99a185a..06ca838 100644 --- a/reach/wifi_networks_test.go +++ b/reach/wifi_networks_test.go @@ -85,7 +85,7 @@ func TestClientCRUDWiFiNetwork(t *testing.T) { } -func TestClientWifiNetworkConnect(t *testing.T) { +func TestClientWifiNetworkJoin(t *testing.T) { if !*runUpdaterIntegrationTests { t.Skip("To run this test, use: go test -updater-integration") @@ -110,7 +110,7 @@ func TestClientWifiNetworkConnect(t *testing.T) { t.Errorf("AddWifiNetwork() -> done: got '%v', expected '%v'", g, e) } - if err := client.ConnectToWifiNetwork(ssid, true); err != nil { + if err := client.JoinWifiNetwork(ssid, true); err != nil { t.Error(err) }