feat: import Sea vHost single-server testing release

This commit is contained in:
canglan committed 2026-10-30 08:39:10 +08:00
commit 248badd33e
441 files changed
+63221

No files matched your search

@@ -0,0 +1,16 @@
//go:build linux
package isolation
import "testing"
func TestFTPSessionIdentificationDoesNotSelectRuntimeProcesses(t *testing.T) {
for _, test := range []struct {
name, exe string
unreadable, want bool
}{{"pure-ftpd", "/www/server/pure-ftpd/sbin/pure-ftpd", false, true}, {"node", "/www/server/nodejs/node", false, false}, {"node", "", true, false}, {"pure-ftpd", "/usr/bin/node", false, false}, {"pure-ftpd", "", true, true}, {"pure-ftpd-other", "", true, false}} {
if got := managedFTPProcess([]byte("Name:\t"+test.name+"\nUid:\t1001\t1001\t1001\t1001\n"), test.exe, test.unreadable); got != test.want {
t.Errorf("FTP match %s: %t", test.name, got)
}
}
}