feat: batch write route msg to unix socket: 'route ip+net: sysctl: no buffer space available' (#466)

This commit is contained in:
naison
2025-03-13 11:07:18 +08:00
committed by GitHub
parent 24d16b2791
commit 5edd70452c
5 changed files with 107 additions and 61 deletions

View File

@@ -40,12 +40,14 @@ var (
func TestFunctions(t *testing.T) {
Init()
kubevpnConnect(t)
kubevpnStatus(t)
t.Run(runtime.FuncForPC(reflect.ValueOf(pingPodIP).Pointer()).Name(), pingPodIP)
t.Run(runtime.FuncForPC(reflect.ValueOf(dialUDP).Pointer()).Name(), dialUDP)
t.Run(runtime.FuncForPC(reflect.ValueOf(healthCheckPod).Pointer()).Name(), healthCheckPod)
t.Run(runtime.FuncForPC(reflect.ValueOf(healthCheckService).Pointer()).Name(), healthCheckService)
t.Run(runtime.FuncForPC(reflect.ValueOf(shortDomain).Pointer()).Name(), shortDomain)
t.Run(runtime.FuncForPC(reflect.ValueOf(fullDomain).Pointer()).Name(), fullDomain)
kubevpnStatus(t)
}
func pingPodIP(t *testing.T) {
@@ -338,6 +340,19 @@ func kubevpnConnect(t *testing.T) {
}
}
func kubevpnStatus(t *testing.T) {
cmd := exec.Command("kubevpn", "status")
stdout, stderr, err := util.RunWithRollingOutWithChecker(cmd, nil)
if err != nil {
t.Log(stdout, stderr)
t.Error(err)
t.Fail()
return
}
t.Log(stdout)
t.Log(stderr)
}
func Init() {
var err error