Skip to content

Commit

Permalink
fix: resolve linter issues (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: Muhammad Luthfi Fahlevi <[email protected]>
  • Loading branch information
luthfifahlevi and Muhammad Luthfi Fahlevi authored Aug 22, 2024
1 parent 071df6f commit 54777a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/server/v1beta1/asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ func TestDeleteAssets(t *testing.T) {
DryRun bool
ExpectStatus codes.Code
ExpectResult *compassv1beta1.DeleteAssetsResponse
Setup func(ctx context.Context, as *mocks.AssetService, astID string)
Setup func(ctx context.Context, as *mocks.AssetService)
}

testCases := []TestCase{
Expand All @@ -1009,7 +1009,7 @@ func TestDeleteAssets(t *testing.T) {
DryRun: false,
ExpectStatus: codes.InvalidArgument,
ExpectResult: nil,
Setup: func(ctx context.Context, as *mocks.AssetService, astID string) {
Setup: func(ctx context.Context, as *mocks.AssetService) {
as.EXPECT().DeleteAssets(ctx, dummyRequest).Return(0, errors.New("something wrong"))
},
},
Expand All @@ -1019,7 +1019,7 @@ func TestDeleteAssets(t *testing.T) {
DryRun: false,
ExpectStatus: codes.OK,
ExpectResult: &compassv1beta1.DeleteAssetsResponse{AffectedRows: 11},
Setup: func(ctx context.Context, as *mocks.AssetService, astID string) {
Setup: func(ctx context.Context, as *mocks.AssetService) {
as.EXPECT().DeleteAssets(ctx, dummyRequest).Return(11, nil)
},
},
Expand All @@ -1032,7 +1032,7 @@ func TestDeleteAssets(t *testing.T) {
mockUserSvc := new(mocks.UserService)
mockAssetSvc := new(mocks.AssetService)
if tc.Setup != nil {
tc.Setup(ctx, mockAssetSvc, assetID)
tc.Setup(ctx, mockAssetSvc)
}
defer mockUserSvc.AssertExpectations(t)
defer mockAssetSvc.AssertExpectations(t)
Expand Down
2 changes: 1 addition & 1 deletion internal/store/postgres/asset_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ func (r *AssetRepository) DeleteByURN(ctx context.Context, urn string) error {

func (r *AssetRepository) DeleteByQueryExpr(ctx context.Context, queryExpr queryexpr.ExprStr) ([]string, error) {
var urns []string
err := r.client.RunWithinTx(ctx, func(tx *sqlx.Tx) error {
err := r.client.RunWithinTx(ctx, func(*sqlx.Tx) error {
query, err := queryexpr.ValidateAndGetQueryFromExpr(queryExpr)
if err != nil {
return err
Expand Down

0 comments on commit 54777a8

Please sign in to comment.