-
Notifications
You must be signed in to change notification settings - Fork 2
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
Do simple #7
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
golangci
mocks_test.go|196 col 1| Function TestMocksHeaderPresentMatcher missing the call to method parallel (paralleltest)
mocks_test.go|220 col 1| Function TestMocksHeaderNotPresentMatcher missing the call to method parallel (paralleltest)
mocks_test.go|244 col 1| Function TestMocksBasicAuth missing the call to method parallel (paralleltest)
mocks_test.go|295 col 1| Function TestMocksQueryMatcherSuccess missing the call to method parallel (paralleltest)
mocks_test.go|322 col 1| Function TestMocksQueryMatcherErrors missing the call to method parallel (paralleltest)
mocks_test.go|350 col 1| Function TestMocksQueryParamsDoesNotOverwriteQuery missing the call to method parallel (paralleltest)
mocks_test.go|363 col 1| Function TestMocksQueryCollection missing the call to method parallel (paralleltest)
mocks_test.go|377 col 1| Function TestMocksQueryCollectionFails missing the call to method parallel (paralleltest)
mocks_test.go|391 col 1| Function TestMocksQueryPresent missing the call to method parallel (paralleltest)
mocks_test.go|412 col 1| Function TestMocksQueryNotPresent missing the call to method parallel (paralleltest)
@@ -1309,7 +1309,7 @@ func TestApiTest_CombineFormDataWithMultipart(t *testing.T) { | |||
for name, tt := range tests { | |||
t.Run(name, func(t *testing.T) { | |||
|
|||
cmd := exec.Command(os.Args[0], "-test.run=TestApiTest_CombineFormDataWithMultipart") | |||
cmd := exec.Command(os.Args[0], "-test.run=TestApiTestCombineFormDataWithMultipart") |
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.
🚫 [golangci] reported by reviewdog 🐶
G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)
@@ -212,7 +212,7 @@ func (m *FS) create(name string) (*os.File, error) { | |||
return file, nil | |||
} | |||
|
|||
func (m *FS) mkdirAll(path string, perm os.FileMode) error { | |||
func (m *FS) mkdirAll(path string, _ os.FileMode) error { |
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.
🚫 [golangci] reported by reviewdog 🐶
(*FS).mkdirAll - result 0 (error) is always nil (unparam)
@@ -428,7 +428,7 @@ func TestApiTest_AddsBasicAuthToRequest(t *testing.T) { | |||
End() | |||
} | |||
|
|||
func TestApiTest_AddsTimedOutContextToRequest(t *testing.T) { | |||
func TestApiTestAddsTimedOutContextToRequest(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
unnecessary leading newline (whitespace)
@@ -753,14 +754,14 @@ func (a *APITest) report() *http.Response { | |||
var capturedMockInteractions []*mockInteraction | |||
|
|||
a.observers = append(a.observers, func(finalRes *http.Response, inboundReq *http.Request, a *APITest) { | |||
capturedFinalRes = copyHttpResponse(finalRes) | |||
capturedInboundReq = copyHttpRequest(inboundReq) | |||
capturedFinalRes = copyHTTPResponse(finalRes) |
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.
🚫 [golangci] reported by reviewdog 🐶
response body must be closed (bodyclose)
@@ -5,7 +5,7 @@ import ( | |||
"testing" | |||
) | |||
|
|||
func TestApiTest_Assert_StatusCodes(t *testing.T) { | |||
func TestApiTestAssertStatusCodes(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestApiTestAssertStatusCodes missing the call to method parallel (paralleltest)
@@ -93,14 +93,14 @@ func TestMocks_CookieNotPresent_FailsToMatch(t *testing.T) { | |||
assert.Equal(t, matchError.Error(), "did not expect a cookie with name 'k'") | |||
} | |||
|
|||
func TestMocks_NewUnmatchedMockError_Empty(t *testing.T) { | |||
func TestMocksNewUnmatchedMockErrorEmpty(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksNewUnmatchedMockErrorEmpty missing the call to method parallel (paralleltest)
mockError := newUnmatchedMockError() | ||
|
||
assert.Equal(t, true, mockError != nil) | ||
assert.Equal(t, 0, len(mockError.errors)) | ||
} | ||
|
||
func TestMocks_NewEmptyUnmatchedMockError_ExpectedErrorsString(t *testing.T) { | ||
func TestMocksNewEmptyUnmatchedMockErrorExpectedErrorsString(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksNewEmptyUnmatchedMockErrorExpectedErrorsString missing the call to method parallel (paralleltest)
@@ -112,7 +112,7 @@ func TestMocks_NewEmptyUnmatchedMockError_ExpectedErrorsString(t *testing.T) { | |||
mockError.Error()) | |||
} | |||
|
|||
func TestMocks_HostMatcher(t *testing.T) { | |||
func TestMocksHostMatcher(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksHostMatcher missing the call to method parallel (paralleltest)
@@ -150,7 +150,7 @@ func TestMocks_HostMatcher(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestMocks_HeaderMatcher(t *testing.T) { | |||
func TestMocksHeaderMatcher(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksHeaderMatcher missing the call to method parallel (paralleltest)
@@ -179,7 +179,7 @@ func TestMocks_HeaderMatcher(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestMocks_MockRequest_Header_WorksWithHeaders(t *testing.T) { | |||
func TestMocksMockRequestHeaderWorksWithHeaders(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksMockRequestHeaderWorksWithHeaders missing the call to method parallel (paralleltest)
@@ -193,7 +193,7 @@ func TestMocks_MockRequest_Header_WorksWithHeaders(t *testing.T) { | |||
assert.Equal(t, true, matchError == nil) | |||
} | |||
|
|||
func TestMocks_HeaderPresentMatcher(t *testing.T) { | |||
func TestMocksHeaderPresentMatcher(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksHeaderPresentMatcher missing the call to method parallel (paralleltest)
@@ -217,7 +217,7 @@ func TestMocks_HeaderPresentMatcher(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestMocks_HeaderNotPresentMatcher(t *testing.T) { | |||
func TestMocksHeaderNotPresentMatcher(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksHeaderNotPresentMatcher missing the call to method parallel (paralleltest)
@@ -241,7 +241,7 @@ func TestMocks_HeaderNotPresentMatcher(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestMocks_BasicAuth(t *testing.T) { | |||
func TestMocksBasicAuth(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksBasicAuth missing the call to method parallel (paralleltest)
@@ -292,9 +292,9 @@ func TestMocks_BasicAuth(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestMocks_QueryMatcher_Success(t *testing.T) { | |||
func TestMocksQueryMatcherSuccess(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksQueryMatcherSuccess missing the call to method parallel (paralleltest)
@@ -319,9 +319,9 @@ func TestMocks_QueryMatcher_Success(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestMocks_QueryMatcher_Errors(t *testing.T) { | |||
func TestMocksQueryMatcherErrors(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksQueryMatcherErrors missing the call to method parallel (paralleltest)
@@ -347,7 +347,7 @@ func TestMocks_QueryMatcher_Errors(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestMocks_QueryParams_DoesNotOverwriteQuery(t *testing.T) { | |||
func TestMocksQueryParamsDoesNotOverwriteQuery(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksQueryParamsDoesNotOverwriteQuery missing the call to method parallel (paralleltest)
@@ -360,7 +360,7 @@ func TestMocks_QueryParams_DoesNotOverwriteQuery(t *testing.T) { | |||
assert.Equal(t, true, matchError == nil) | |||
} | |||
|
|||
func TestMocks_QueryCollection(t *testing.T) { | |||
func TestMocksQueryCollection(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksQueryCollection missing the call to method parallel (paralleltest)
@@ -374,7 +374,7 @@ func TestMocks_QueryCollection(t *testing.T) { | |||
assert.Equal(t, true, matchError == nil) | |||
} | |||
|
|||
func TestMocks_QueryCollection_Fails(t *testing.T) { | |||
func TestMocksQueryCollectionFails(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksQueryCollectionFails missing the call to method parallel (paralleltest)
@@ -388,9 +388,9 @@ func TestMocks_QueryCollection_Fails(t *testing.T) { | |||
assert.Equal(t, true, matchError != nil) | |||
} | |||
|
|||
func TestMocks_QueryPresent(t *testing.T) { | |||
func TestMocksQueryPresent(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksQueryPresent missing the call to method parallel (paralleltest)
matchError := queryPresentMatcher(req, mockRequest) | ||
assert.Equal(t, test.expectedError, matchError) | ||
}) | ||
} | ||
} | ||
|
||
func TestMocks_QueryNotPresent(t *testing.T) { | ||
func TestMocksQueryNotPresent(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
Function TestMocksQueryNotPresent missing the call to method parallel (paralleltest)
Code Metrics Report
Details | | main (3e95163) | #7 (01b212b) | +/- |
|---------------------|----------------|--------------|-------|
+ | Coverage | 82.4% | 82.4% | +0.0% |
| Files | 7 | 7 | 0 |
| Lines | 1586 | 1588 | +2 |
+ | Covered | 1307 | 1309 | +2 |
+ | Test Execution Time | 7s | 4s | -3s | Code coverage of files in pull request scope (77.8% → 82.4%)
Reported by octocov |
@@ -451,7 +450,7 @@ func TestApiTest_AddsTimedOutContextToRequest(t *testing.T) { | |||
End() | |||
} | |||
|
|||
func TestApiTest_AddsCancelledContextToRequest(t *testing.T) { | |||
func TestApiTestAddsCancelledContextToRequest(t *testing.T) { |
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.
🚫 [golangci] reported by reviewdog 🐶
unnecessary leading newline (whitespace)
request: copyHttpRequest(mockReq), | ||
response: copyHttpResponse(mockRes), | ||
request: copyHTTPRequest(mockReq), | ||
response: copyHTTPResponse(mockRes), |
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.
🚫 [golangci] reported by reviewdog 🐶
response body must be closed (bodyclose)
No description provided.