-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
testifylint: enable go-require #5983
testifylint: enable go-require #5983
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5983 +/- ##
=======================================
Coverage 96.78% 96.78%
=======================================
Files 348 348
Lines 16559 16559
=======================================
Hits 16027 16027
Misses 343 343
Partials 189 189
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
a866dd6
to
8b128cf
Compare
pkg/es/client/index_client_test.go
Outdated
@@ -385,7 +385,7 @@ func TestClientCreateAliases(t *testing.T) { | |||
assert.Equal(t, http.MethodPost, req.Method) | |||
assert.Equal(t, "Basic foobar", req.Header.Get("Authorization")) | |||
body, err := io.ReadAll(req.Body) | |||
require.NoError(t, err) | |||
assert.NoError(t, err) |
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 should be used as if condition before using body in the next line
@@ -501,7 +501,7 @@ func TestGetErrorRatesZero(t *testing.T) { | |||
defer r.Body.Close() | |||
|
|||
u, err := url.Parse("http://" + r.Host + r.RequestURI + "?" + string(body)) | |||
require.NoError(t, err) | |||
assert.NoError(t, err) |
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.
If assert... ?
plugin/storage/es/factory_test.go
Outdated
@@ -354,10 +354,10 @@ func testPasswordFromFile(t *testing.T, f *Factory, getClient func() es.Client, | |||
t.Logf("request to fake ES server: %v", r) | |||
// epecting header in the form Authorization:[Basic OmZpcnN0IHBhc3N3b3Jk] | |||
h := strings.Split(r.Header.Get("Authorization"), " ") | |||
require.Len(t, h, 2) | |||
require.Equal(t, "Basic", h[0]) | |||
assert.Len(t, h, 2) |
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.
If not this then return?
8b128cf
to
e515315
Compare
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
e515315
to
6425bfd
Compare
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:yarn lint
andyarn test