FIx shared structs + add better debugging/linting (#379)
* fix: Fixes issues w/ shared pointers to structs (#378) * feat: Adds even better debugging and linting support (#376) This is a #PATCH release.
This commit is contained in:
committed by
GitHub
parent
c3d7f26e3c
commit
5c9b88db4f
@@ -44,9 +44,9 @@ func TestPostComment(t *testing.T) {
|
||||
commentService{testProjectData, fakeCommentClient{}},
|
||||
withMr(testProjectData, fakeMergeRequestLister{}),
|
||||
withPayloadValidation(methodToPayload{
|
||||
http.MethodPost: &PostCommentRequest{},
|
||||
http.MethodDelete: &DeleteCommentRequest{},
|
||||
http.MethodPatch: &EditCommentRequest{},
|
||||
http.MethodPost: newPayload[PostCommentRequest],
|
||||
http.MethodDelete: newPayload[DeleteCommentRequest],
|
||||
http.MethodPatch: newPayload[EditCommentRequest],
|
||||
}),
|
||||
withMethodCheck(http.MethodPost, http.MethodDelete, http.MethodPatch),
|
||||
)
|
||||
@@ -66,9 +66,9 @@ func TestPostComment(t *testing.T) {
|
||||
commentService{testProjectData, fakeCommentClient{}},
|
||||
withMr(testProjectData, fakeMergeRequestLister{}),
|
||||
withPayloadValidation(methodToPayload{
|
||||
http.MethodPost: &PostCommentRequest{},
|
||||
http.MethodDelete: &DeleteCommentRequest{},
|
||||
http.MethodPatch: &EditCommentRequest{},
|
||||
http.MethodPost: newPayload[PostCommentRequest],
|
||||
http.MethodDelete: newPayload[DeleteCommentRequest],
|
||||
http.MethodPatch: newPayload[EditCommentRequest],
|
||||
}),
|
||||
withMethodCheck(http.MethodPost, http.MethodDelete, http.MethodPatch),
|
||||
)
|
||||
@@ -82,9 +82,9 @@ func TestPostComment(t *testing.T) {
|
||||
commentService{testProjectData, fakeCommentClient{testBase{errFromGitlab: true}}},
|
||||
withMr(testProjectData, fakeMergeRequestLister{}),
|
||||
withPayloadValidation(methodToPayload{
|
||||
http.MethodPost: &PostCommentRequest{},
|
||||
http.MethodDelete: &DeleteCommentRequest{},
|
||||
http.MethodPatch: &EditCommentRequest{},
|
||||
http.MethodPost: newPayload[PostCommentRequest],
|
||||
http.MethodDelete: newPayload[DeleteCommentRequest],
|
||||
http.MethodPatch: newPayload[EditCommentRequest],
|
||||
}),
|
||||
withMethodCheck(http.MethodPost, http.MethodDelete, http.MethodPatch),
|
||||
)
|
||||
@@ -98,9 +98,9 @@ func TestPostComment(t *testing.T) {
|
||||
commentService{testProjectData, fakeCommentClient{testBase{status: http.StatusSeeOther}}},
|
||||
withMr(testProjectData, fakeMergeRequestLister{}),
|
||||
withPayloadValidation(methodToPayload{
|
||||
http.MethodPost: &PostCommentRequest{},
|
||||
http.MethodDelete: &DeleteCommentRequest{},
|
||||
http.MethodPatch: &EditCommentRequest{},
|
||||
http.MethodPost: newPayload[PostCommentRequest],
|
||||
http.MethodDelete: newPayload[DeleteCommentRequest],
|
||||
http.MethodPatch: newPayload[EditCommentRequest],
|
||||
}),
|
||||
withMethodCheck(http.MethodPost, http.MethodDelete, http.MethodPatch),
|
||||
)
|
||||
@@ -117,9 +117,9 @@ func TestDeleteComment(t *testing.T) {
|
||||
commentService{testProjectData, fakeCommentClient{}},
|
||||
withMr(testProjectData, fakeMergeRequestLister{}),
|
||||
withPayloadValidation(methodToPayload{
|
||||
http.MethodPost: &PostCommentRequest{},
|
||||
http.MethodDelete: &DeleteCommentRequest{},
|
||||
http.MethodPatch: &EditCommentRequest{},
|
||||
http.MethodPost: newPayload[PostCommentRequest],
|
||||
http.MethodDelete: newPayload[DeleteCommentRequest],
|
||||
http.MethodPatch: newPayload[EditCommentRequest],
|
||||
}),
|
||||
withMethodCheck(http.MethodPost, http.MethodDelete, http.MethodPatch),
|
||||
)
|
||||
@@ -136,9 +136,9 @@ func TestEditComment(t *testing.T) {
|
||||
commentService{testProjectData, fakeCommentClient{}},
|
||||
withMr(testProjectData, fakeMergeRequestLister{}),
|
||||
withPayloadValidation(methodToPayload{
|
||||
http.MethodPost: &PostCommentRequest{},
|
||||
http.MethodDelete: &DeleteCommentRequest{},
|
||||
http.MethodPatch: &EditCommentRequest{},
|
||||
http.MethodPost: newPayload[PostCommentRequest],
|
||||
http.MethodDelete: newPayload[DeleteCommentRequest],
|
||||
http.MethodPatch: newPayload[EditCommentRequest],
|
||||
}),
|
||||
withMethodCheck(http.MethodPost, http.MethodDelete, http.MethodPatch),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user