diff --git a/robot/client/client_test.go b/robot/client/client_test.go index 6a54c4b60c4..86f1d4c8e08 100644 --- a/robot/client/client_test.go +++ b/robot/client/client_test.go @@ -332,9 +332,7 @@ func TestStatusClient(t *testing.T) { test.That(t, png.Encode(&imgBuf, img), test.ShouldBeNil) injectCamera.ImageFunc = func(ctx context.Context, mimeType string, extra map[string]interface{}) ([]byte, camera.ImageMetadata, error) { - resBytes, err := rimage.EncodeImage(ctx, img, mimeType) - test.That(t, err, test.ShouldBeNil) - return resBytes, camera.ImageMetadata{MimeType: mimeType}, nil + return imgBuf.Bytes(), camera.ImageMetadata{MimeType: rutils.MimeTypePNG}, nil } injectInputDev := &inject.InputController{} @@ -510,7 +508,7 @@ func TestStatusClient(t *testing.T) { 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{}) + test.That(t, metadata, test.ShouldResemble, camera.ImageMetadata{}) gripper1, err := gripper.FromRobot(client, "gripper1") test.That(t, err, test.ShouldBeNil)