From df299ca226c0b9500c5a3e98fe8dd5c09eb14e7d Mon Sep 17 00:00:00 2001 From: zhenghaoz Date: Wed, 30 Oct 2024 22:06:00 +0800 Subject: [PATCH] Fix lint --- storage/data/database_test.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/storage/data/database_test.go b/storage/data/database_test.go index 25d84071a..eeea8fc40 100644 --- a/storage/data/database_test.go +++ b/storage/data/database_test.go @@ -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() @@ -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) @@ -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) }