Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

enhancement: 909; fix broken tests

zahash6ff4a8b1b0ab
diff --git a/internal/repo/repo_test/tag_rel_repo_test.go b/internal/repo/repo_test/tag_rel_repo_test.go
index edcd45e9..f3696590 100644
--- a/internal/repo/repo_test/tag_rel_repo_test.go
+++ b/internal/repo/repo_test/tag_rel_repo_test.go
@@ -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,
},
}
@@ -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)
}
@@ -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)
@@ -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)
}