mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-12-24 11:51:13 +08:00
feat: optimize code
This commit is contained in:
@@ -3,6 +3,7 @@ package util
|
||||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/containernetworking/cni/libcni"
|
||||
@@ -94,6 +95,9 @@ func TestPing(t *testing.T) {
|
||||
}
|
||||
ipConn, err := net.ListenPacket("ip4:icmp", "0.0.0.0")
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "operation not permitted") {
|
||||
return
|
||||
}
|
||||
t.Error(err)
|
||||
}
|
||||
bytes := buf.Bytes()
|
||||
|
||||
Reference in New Issue
Block a user