Rename ConnectToWifiNetwork() to JoinWifiNetwork() for brevety and clarity

This commit is contained in:
wpetit 2018-09-20 12:08:20 +02:00
parent 13267b2d5a
commit 5f6dcd2253
3 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)
}