-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing Linters in Cassandra, Clickhouse & Opentsdb #1252
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good refactoring 👍
Some minor remarks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may think I'm against these changes 😅
But, I'm not 😁
@@ -181,8 +183,7 @@ func TestPutInvalidDataPoint(t *testing.T) { | |||
resp := &PutResponse{} | |||
|
|||
err := client.PutDataPoints(context.Background(), dataPoints, "", resp) | |||
require.Error(t, err) | |||
require.Equal(t, "the value of the given datapoint is invalid", err.Error()) | |||
require.EqualError(t, err, "invalid data points: please give a valid value") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this
require.EqualError(t, err, "invalid data points: please give a valid value") | |
require.ErrotIs(t, err, errInvalidDataPoint) | |
require.ErrorContains(t, err, "please give a valid value") |
@@ -226,8 +226,7 @@ func TestPutErrorResponse(t *testing.T) { | |||
resp := &PutResponse{} | |||
|
|||
err := client.PutDataPoints(context.Background(), dataPoints, "", resp) | |||
require.Error(t, err) | |||
require.Equal(t, "client error: 400", err.Error()) | |||
require.EqualError(t, err, "error response from OpenTSDB server, status code: 400") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can test errResp here
Description:
Checklist:
goimport
andgolangci-lint
.Thank you for your contribution!