Skip to content

Commit

Permalink
If err, then bytes and metadata should be falsy
Browse files Browse the repository at this point in the history
  • Loading branch information
hexbabe committed Nov 14, 2024
1 parent 65b5bad commit 9a9612f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion robot/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,11 @@ func TestStatusClient(t *testing.T) {

camera1, err := camera.FromRobot(client, "camera1")
test.That(t, err, test.ShouldBeNil)
_, _, err = camera1.Image(context.Background(), rutils.MimeTypeJPEG, nil)
imgBytes, metadata, err := camera1.Image(context.Background(), rutils.MimeTypeJPEG, nil)
test.That(t, err, test.ShouldNotBeNil)
test.That(t, err.Error(), test.ShouldContainSubstring, "not found")
test.That(t, imgBytes, test.ShouldBeNil)
test.That(t, metadata, test.ShouldEqual, camera.ImageMetadata{})

gripper1, err := gripper.FromRobot(client, "gripper1")
test.That(t, err, test.ShouldBeNil)
Expand Down

0 comments on commit 9a9612f

Please sign in to comment.