Add native protocol service plugins
测试构建 / 代码检查 (push) Has been cancelled
测试构建 / 单元测试和构建 (push) Has been cancelled
测试构建 / 构建验证 (push) Has been cancelled

This commit is contained in:
ZacharyZcR
2026-05-23 15:51:50 +08:00
parent 73cbe803c4
commit 8d30ee334c
16 changed files with 812 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
//go:build plugin_zookeeper || !plugin_selective
package services
import "testing"
func TestParseZooKeeperResponse(t *testing.T) {
banner, ok := parseZooKeeperResponse([]byte("imok"))
if !ok || banner != "ZooKeeper ruok=imok" {
t.Fatalf("unexpected zookeeper banner: %q ok=%v", banner, ok)
}
if _, ok := parseZooKeeperResponse([]byte("hello")); ok {
t.Fatal("unexpected match for non-zookeeper response")
}
}