chore: 项目基线(基于 WeKnora 定制版,整理文件忽略规则)

This commit is contained in:
runny committed 2026-11-13 17:54:56 +08:00
commit 9097ee699d
5769 files changed
+1446466

No files matched your search

@@ -0,0 +1,39 @@
package container
import (
"testing"
"github.com/Tencent/WeKnora/internal/datasource"
"github.com/Tencent/WeKnora/internal/types"
)
func TestConnectorRegistryIncludesDingTalk(t *testing.T) {
registry, err := initConnectorRegistry()
if err != nil {
t.Fatalf("initConnectorRegistry() error = %v", err)
}
connector, err := registry.Get(types.ConnectorTypeDingTalk)
if err != nil {
t.Fatalf("DingTalk connector is not registered: %v", err)
}
if connector.Type() != types.ConnectorTypeDingTalk {
t.Fatalf("connector.Type() = %q", connector.Type())
}
}
func TestConnectorRegistryIncludesSeafile(t *testing.T) {
registry, err := initConnectorRegistry()
if err != nil {
t.Fatalf("initConnectorRegistry() error = %v", err)
}
connector, err := registry.Get(types.ConnectorTypeSeafile)
if err != nil {
t.Fatalf("Seafile connector is not registered: %v", err)
}
if connector.Type() != types.ConnectorTypeSeafile {
t.Fatalf("connector.Type() = %q", connector.Type())
}
if _, ok := connector.(datasource.FullStreamingConnector); !ok {
t.Fatal("Seafile connector must implement datasource.FullStreamingConnector")
}
}