MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / TestCreatePostIndex

Function TestCreatePostIndex

internal/repository/search_test.go:46–52  ·  view source on GitHub ↗

测试CreatePostIndex函数

(t *testing.T)

Source from the content-addressed store, hash-verified

44
45// 测试CreatePostIndex函数
46func TestCreatePostIndex(t *testing.T) {
47 searchDAO := dao.NewSearchDAO(createMockElasticsearchClient(), createMockLogger())
48 err := searchDAO.CreatePostIndex(context.Background())
49 if err != nil {
50 t.Errorf("CreatePostIndex failed: %v", err)
51 }
52}
53
54// 测试SearchPosts函数
55func TestSearchPosts(t *testing.T) {

Callers

nothing calls this directly

Calls 4

CreatePostIndexMethod · 0.95
NewSearchDAOFunction · 0.92
createMockLoggerFunction · 0.85

Tested by

no test coverage detected