|
8 | 8 | "net"
|
9 | 9 | "os"
|
10 | 10 | "testing"
|
11 |
| - "time" |
12 | 11 |
|
13 | 12 | "github.com/golang/geo/r3"
|
14 | 13 | "github.com/pkg/errors"
|
@@ -49,7 +48,6 @@ func TestClientWorkingService(t *testing.T) {
|
49 | 48 | pcd, err := os.ReadFile(pcdPath)
|
50 | 49 | test.That(t, err, test.ShouldBeNil)
|
51 | 50 |
|
52 |
| - timestampSucc := time.Now().UTC() |
53 | 51 | propSucc := slam.Properties{
|
54 | 52 | CloudSlam: false,
|
55 | 53 | MappingMode: slam.MappingModeNewMap,
|
@@ -92,10 +90,6 @@ func TestClientWorkingService(t *testing.T) {
|
92 | 90 | return f, nil
|
93 | 91 | }
|
94 | 92 |
|
95 |
| - workingSLAMService.LatestMapInfoFunc = func(ctx context.Context) (time.Time, error) { |
96 |
| - return timestampSucc, nil |
97 |
| - } |
98 |
| - |
99 | 93 | workingSLAMService.PropertiesFunc = func(ctx context.Context) (slam.Properties, error) {
|
100 | 94 | return propSucc, nil
|
101 | 95 | }
|
@@ -145,11 +139,6 @@ func TestClientWorkingService(t *testing.T) {
|
145 | 139 | test.That(t, err, test.ShouldBeNil)
|
146 | 140 | test.That(t, fullBytesInternalState, test.ShouldResemble, internalStateSucc)
|
147 | 141 |
|
148 |
| - // test latest map info |
149 |
| - timestamp, err := workingSLAMClient.LatestMapInfo(context.Background()) |
150 |
| - test.That(t, err, test.ShouldBeNil) |
151 |
| - test.That(t, timestamp, test.ShouldResemble, timestampSucc) |
152 |
| - |
153 | 142 | // test properties
|
154 | 143 | prop, err := workingSLAMClient.Properties(context.Background())
|
155 | 144 | test.That(t, err, test.ShouldBeNil)
|
@@ -185,11 +174,6 @@ func TestClientWorkingService(t *testing.T) {
|
185 | 174 | test.That(t, err, test.ShouldBeNil)
|
186 | 175 | test.That(t, fullBytesInternalState, test.ShouldResemble, internalStateSucc)
|
187 | 176 |
|
188 |
| - // test latest map info |
189 |
| - timestamp, err := workingDialedClient.LatestMapInfo(context.Background()) |
190 |
| - test.That(t, err, test.ShouldBeNil) |
191 |
| - test.That(t, timestamp, test.ShouldResemble, timestampSucc) |
192 |
| - |
193 | 177 | // test properties
|
194 | 178 | prop, err := workingDialedClient.Properties(context.Background())
|
195 | 179 | test.That(t, err, test.ShouldBeNil)
|
@@ -233,11 +217,6 @@ func TestClientWorkingService(t *testing.T) {
|
233 | 217 | test.That(t, err, test.ShouldBeNil)
|
234 | 218 | test.That(t, fullBytesInternalState, test.ShouldResemble, internalStateSucc)
|
235 | 219 |
|
236 |
| - // test latest map info |
237 |
| - timestamp, err := dialedClient.LatestMapInfo(context.Background()) |
238 |
| - test.That(t, err, test.ShouldBeNil) |
239 |
| - test.That(t, timestamp, test.ShouldResemble, timestampSucc) |
240 |
| - |
241 | 220 | // test properties
|
242 | 221 | prop, err := dialedClient.Properties(context.Background())
|
243 | 222 | test.That(t, err, test.ShouldBeNil)
|
@@ -276,10 +255,6 @@ func TestFailingClient(t *testing.T) {
|
276 | 255 | return nil, errors.New("failure during get internal state")
|
277 | 256 | }
|
278 | 257 |
|
279 |
| - failingSLAMService.LatestMapInfoFunc = func(ctx context.Context) (time.Time, error) { |
280 |
| - return time.Time{}, errors.New("failure to get latest map info") |
281 |
| - } |
282 |
| - |
283 | 258 | failingSLAMService.PropertiesFunc = func(ctx context.Context) (slam.Properties, error) {
|
284 | 259 | return slam.Properties{}, errors.New("failure to get properties")
|
285 | 260 | }
|
@@ -333,12 +308,6 @@ func TestFailingClient(t *testing.T) {
|
333 | 308 | test.That(t, err.Error(), test.ShouldContainSubstring, "failure during get internal state")
|
334 | 309 | test.That(t, fullBytesInternalState, test.ShouldBeNil)
|
335 | 310 |
|
336 |
| - // test latest map info |
337 |
| - timestamp, err := failingSLAMClient.LatestMapInfo(context.Background()) |
338 |
| - test.That(t, err, test.ShouldNotBeNil) |
339 |
| - test.That(t, err.Error(), test.ShouldContainSubstring, "failure to get latest map info") |
340 |
| - test.That(t, timestamp, test.ShouldResemble, time.Time{}) |
341 |
| - |
342 | 311 | // test properties
|
343 | 312 | prop, err := failingSLAMClient.Properties(context.Background())
|
344 | 313 | test.That(t, err, test.ShouldNotBeNil)
|
|
0 commit comments