Skip to content

Commit

Permalink
enhancement: 909; fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zahash authored and LinkinStars committed Apr 25, 2024
1 parent 2b053f1 commit 4bed411
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions internal/repo/repo_test/tag_rel_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ var (
tagRelOnce sync.Once
testTagRelList = []*entity.TagRel{
{
ObjectID: "10010000000000001",
TagID: "10030000000000001",
ObjectID: "10010000000000101",
TagID: "10030000000000101",
Status: entity.TagRelStatusAvailable,
},
{
ObjectID: "10010000000000002",
TagID: "10030000000000002",
ObjectID: "10010000000000202",
TagID: "10030000000000202",
Status: entity.TagRelStatusAvailable,
},
}
Expand All @@ -68,7 +68,7 @@ func Test_tagListRepo_BatchGetObjectTagRelList(t *testing.T) {
func Test_tagListRepo_CountTagRelByTagID(t *testing.T) {
tagRelOnce.Do(addTagRelList)
tagRelRepo := tag.NewTagRelRepo(testDataSource, unique.NewUniqueIDRepo(testDataSource))
count, err := tagRelRepo.CountTagRelByTagID(context.TODO(), "10030000000000001")
count, err := tagRelRepo.CountTagRelByTagID(context.TODO(), "10030000000000101")
assert.NoError(t, err)
assert.Equal(t, int64(1), count)
}
Expand Down Expand Up @@ -96,7 +96,7 @@ func Test_tagListRepo_GetObjectTagRelWithoutStatus(t *testing.T) {
err = tagRelRepo.RemoveTagRelListByIDs(context.TODO(), ids)
assert.NoError(t, err)

count, err := tagRelRepo.CountTagRelByTagID(context.TODO(), "10030000000000001")
count, err := tagRelRepo.CountTagRelByTagID(context.TODO(), "10030000000000101")
assert.NoError(t, err)
assert.Equal(t, int64(0), count)

Expand All @@ -107,7 +107,7 @@ func Test_tagListRepo_GetObjectTagRelWithoutStatus(t *testing.T) {
err = tagRelRepo.EnableTagRelByIDs(context.TODO(), ids)
assert.NoError(t, err)

count, err = tagRelRepo.CountTagRelByTagID(context.TODO(), "10030000000000001")
count, err = tagRelRepo.CountTagRelByTagID(context.TODO(), "10030000000000101")
assert.NoError(t, err)
assert.Equal(t, int64(1), count)
}

0 comments on commit 4bed411

Please sign in to comment.