This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
2018-09-21 12:31:52 +02:00
|
|
|
package reachview
|
2018-09-20 17:28:18 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2018-09-21 12:31:52 +02:00
|
|
|
|
|
|
|
"forge.cadoles.com/Pyxis/orion/emlid"
|
2018-09-21 15:39:21 +02:00
|
|
|
"github.com/davecgh/go-spew/spew"
|
2018-09-20 17:28:18 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func TestReachViewConfiguration(t *testing.T) {
|
|
|
|
|
|
|
|
if !*runReachViewIntegrationTests {
|
|
|
|
t.Skip("To run this test, use: go test -reachview-integration")
|
|
|
|
}
|
|
|
|
|
2018-09-21 12:31:52 +02:00
|
|
|
client := NewClient(
|
|
|
|
emlid.WithStandardLogger(),
|
|
|
|
emlid.WithEndpoint(*reachHost, 80),
|
2018-09-20 17:28:18 +02:00
|
|
|
)
|
|
|
|
if err := client.Connect(); err != nil {
|
|
|
|
t.Fatal(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
config, err := client.Configuration()
|
|
|
|
if err != nil {
|
|
|
|
t.Error(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if config == nil {
|
2018-09-20 17:40:23 +02:00
|
|
|
t.Fatal("config should not be nil")
|
|
|
|
}
|
|
|
|
|
|
|
|
if config.RTKSettings == nil {
|
|
|
|
t.Fatal("config.RTKSettings should not be nil")
|
2018-09-20 17:28:18 +02:00
|
|
|
}
|
|
|
|
|
2018-09-21 15:39:21 +02:00
|
|
|
spew.Dump(config)
|
|
|
|
|
2018-09-20 17:28:18 +02:00
|
|
|
defer client.Close()
|
|
|
|
|
|
|
|
}
|