Mutualise RebootNow() method on Client
This commit is contained in:
parent
a1a417b05b
commit
e63d7b6f97
|
@ -1,4 +1,4 @@
|
|||
package updater
|
||||
package emlid
|
||||
|
||||
import (
|
||||
"context"
|
|
@ -1,26 +1,20 @@
|
|||
package updater
|
||||
package emlid
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"forge.cadoles.com/Pyxis/orion/emlid"
|
||||
)
|
||||
|
||||
func TestClientRebootNow(t *testing.T) {
|
||||
|
||||
if !*runUpdaterIntegrationTests {
|
||||
t.Skip("To run this test, use: go test -updater-integration")
|
||||
}
|
||||
|
||||
if !*runRebootTest {
|
||||
t.Skip("To run this test, use: go test -updater-reboot-test")
|
||||
t.Skip("To run this test, use: go test -reboot-test")
|
||||
}
|
||||
|
||||
client := NewClient(
|
||||
emlid.WithStandardLogger(),
|
||||
emlid.WithEndpoint(*reachHost, 80),
|
||||
WithStandardLogger(),
|
||||
WithEndpoint(*reachHost, 80),
|
||||
)
|
||||
if err := client.Connect(); err != nil {
|
||||
t.Fatal(err)
|
|
@ -7,11 +7,6 @@ var runUpdaterIntegrationTests = flag.Bool(
|
|||
"Run the 'Updater' integration tests (in addition to the unit tests)",
|
||||
)
|
||||
|
||||
var runRebootTest = flag.Bool(
|
||||
"updater-reboot-test", false,
|
||||
"Run the updater 'Reboot' test (in addition to the unit tests)",
|
||||
)
|
||||
|
||||
var runJoinNetworkTest = flag.Bool(
|
||||
"updater-join-network-test", false,
|
||||
"Run the updater 'JoinWiFiNetwork' test (in addition to the unit tests)",
|
||||
|
|
|
@ -6,3 +6,13 @@ var runDiscoveryIntegrationTests = flag.Bool(
|
|||
"discovery-integration", false,
|
||||
"Run the 'Discovery' integration tests (in addition to the unit tests)",
|
||||
)
|
||||
|
||||
var runRebootTest = flag.Bool(
|
||||
"reboot-test", false,
|
||||
"Run the updater 'Reboot' test (in addition to the unit tests)",
|
||||
)
|
||||
|
||||
var reachHost = flag.String(
|
||||
"reach-host", "192.168.42.1",
|
||||
"The Reach module host to use in integration tests",
|
||||
)
|
||||
|
|
Reference in New Issue