Skip to content

Commit 5c07a79

Browse files
authored
[chore][receiver/awslambdareceiver] improve linting (#44778)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Improve linting for `receiver/awslambda`. This is part of the process to enable the [modernize](#44199) linter in CI. There are no changes in the component behaviour. ```sh Error: receiver/awslambdareceiver/internal/s3_test.go:64:3: error-is-as: use require.ErrorIs or require.ErrorAs depending on the case (testifylint) require.IsType(t, &consumererror.Error{}, err) ^ ``` Signed-off-by: Paulo Dias <[email protected]>
1 parent 52d8ca0 commit 5c07a79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

receiver/awslambdareceiver/internal/s3_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func TestS3ServiceReadObject(t *testing.T) {
6161
client := s3ServiceClient{api: mockAPI}
6262
_, err := client.ReadObject(t.Context(), bucketName, objectKey)
6363
require.Error(t, err)
64-
require.IsType(t, &consumererror.Error{}, err)
64+
var consumerErr *consumererror.Error
65+
require.ErrorAs(t, err, &consumerErr)
6566
})
6667
}
6768

0 commit comments

Comments
 (0)