Skip to content

Commit

Permalink
unblock properties (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnN193 authored Apr 2, 2024
1 parent b6c7ef2 commit 9f728e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 3 additions & 2 deletions viam_cartographer.go
Original file line number Diff line number Diff line change
Expand Up @@ -660,8 +660,9 @@ func (cartoSvc *CartographerService) Properties(ctx context.Context) (slam.Prope
_, span := trace.StartSpan(ctx, "viamcartographer::CartographerService::Properties")
defer span.End()

if err := cartoSvc.isOpenAndRunningLocally("Properties"); err != nil {
return slam.Properties{}, err
if cartoSvc.closed {
cartoSvc.logger.Warn("Properties called after closed")
return slam.Properties{}, ErrClosed
}

props := slam.Properties{
Expand Down
4 changes: 0 additions & 4 deletions viam_cartographer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ func TestNew(t *testing.T) {
test.That(t, gisF, test.ShouldBeNil)
test.That(t, err, test.ShouldBeError, viamcartographer.ErrUseCloudSlamEnabled)

prop, err := svc.Properties(ctx)
test.That(t, err, test.ShouldBeError, viamcartographer.ErrUseCloudSlamEnabled)
test.That(t, prop, test.ShouldResemble, slam.Properties{})

cmd := map[string]interface{}{}
resp, err := svc.DoCommand(ctx, cmd)
test.That(t, resp, test.ShouldBeNil)
Expand Down

0 comments on commit 9f728e4

Please sign in to comment.