diff --git a/emlid/updater/reboot_now.go b/emlid/reboot_now.go similarity index 98% rename from emlid/updater/reboot_now.go rename to emlid/reboot_now.go index de09855..b9bf72f 100644 --- a/emlid/updater/reboot_now.go +++ b/emlid/reboot_now.go @@ -1,4 +1,4 @@ -package updater +package emlid import ( "context" diff --git a/emlid/updater/reboot_now_test.go b/emlid/reboot_now_test.go similarity index 56% rename from emlid/updater/reboot_now_test.go rename to emlid/reboot_now_test.go index 0527776..cff66a7 100644 --- a/emlid/updater/reboot_now_test.go +++ b/emlid/reboot_now_test.go @@ -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) diff --git a/emlid/updater/util_test.go b/emlid/updater/util_test.go index a4e27b0..7bb5361 100644 --- a/emlid/updater/util_test.go +++ b/emlid/updater/util_test.go @@ -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)", diff --git a/emlid/util_test.go b/emlid/util_test.go index 77a597c..d94176b 100644 --- a/emlid/util_test.go +++ b/emlid/util_test.go @@ -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", +)