skip test requires root permission

This commit is contained in:
v2ray committed 2016-08-16 09:01:58 +02:00
1 parent 9876844296
commit 41d89e6d1e
2 files changed
+5 -2

No files matched your search

+5
View File
@@ -3,6 +3,7 @@
package udp_test
import (
"os"
"syscall"
"testing"
@@ -16,6 +17,10 @@ import (
func TestHubSocksOption(t *testing.T) {
assert := assert.On(t)
if os.Geteuid() != 0 {
// This test case requires root permission.
return
}
hub, err := ListenUDP(v2net.LocalHostIP, v2net.Port(0), ListenOption{
Callback: func(*alloc.Buffer, *proxy.SessionInfo) {},