Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnN193 committed Apr 4, 2024
1 parent 17a60d4 commit 2b60159
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions viam_cartographer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ func TestNew(t *testing.T) {

test.That(t, svc.Close(context.Background()), test.ShouldBeNil)
})
t.Run("Successful creation of cartographer slam service without mode configured", func(t *testing.T) {
termFunc := testhelper.InitTestCL(t, logger)
defer termFunc()

attrCfg := &vcConfig.Config{
Camera: map[string]string{"name": string(s.GoodLidar), "data_frequency_hz": testLidarDataFreqHz},
EnableMapping: &_true,
}

svc, err := testhelper.CreateSLAMService(t, attrCfg, logger)
test.That(t, err, test.ShouldBeNil)

test.That(t, svc.Close(context.Background()), test.ShouldBeNil)
})

t.Run("Successful creation of cartographer slam service with good lidar without IMU name specified", func(t *testing.T) {
termFunc := testhelper.InitTestCL(t, logger)
Expand Down

0 comments on commit 2b60159

Please sign in to comment.