mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
Add native protocol service plugins
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user