Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghaoz committed Oct 30, 2024
1 parent 4c203ac commit df299ca
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions storage/data/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,6 @@ func (suite *baseTestSuite) TestItems() {
suite.True(errors.Is(err, errors.NotFound), err)

// test override
err = suite.Database.BatchInsertItems(ctx, []Item{{ItemId: "4", IsHidden: false, Categories: []string{"b"}, Labels: []string{"o"}, Comment: "override"}})
suite.NoError(err)
err = suite.Database.Optimize()
err = suite.Database.BatchInsertItems(ctx, []Item{{Namespace: "namespace", ItemId: "4", IsHidden: false, Categories: []string{"b"}, Labels: []string{"o"}, Comment: "override"}})
suite.NoError(err)
err = suite.Database.Optimize()
Expand Down Expand Up @@ -589,9 +586,10 @@ func (suite *baseTestSuite) TestDeleteFeedback() {
// RowAffected isn't supported by ClickHouse,
suite.Equal(3, deleteCount)
}
ret, err = suite.Database.GetUserItemFeedback(ctx, "namespace", "2", "3")
err = suite.Database.Optimize()
suite.NoError(err)
ret, err = suite.Database.GetUserItemFeedback(ctx, "namespace", "2", "3")
suite.NoError(err)
suite.Empty(ret)
feedbackType1 := "type1"
deleteCount, err = suite.Database.DeleteUserItemFeedback(ctx, "namespace", "1", "3", feedbackType1)
Expand All @@ -600,11 +598,6 @@ func (suite *baseTestSuite) TestDeleteFeedback() {
suite.Equal(1, deleteCount)
}
ret, err = suite.Database.GetUserItemFeedback(ctx, "namespace", "1", "3", feedbackType2)
if !suite.isClickHouse() {
// RowAffected isn't supported by ClickHouse,
suite.Equal(1, deleteCount)
}
ret, err = suite.Database.GetUserItemFeedback(ctx, "1", "3", feedbackType2)
suite.NoError(err)
suite.Empty(ret)
}
Expand Down

0 comments on commit df299ca

Please sign in to comment.