We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3e79509 commit 23b0320Copy full SHA for 23b0320
internal/tun/tun_test.go
@@ -4,6 +4,7 @@ package tun
4
5
import (
6
"os"
7
+ "strings"
8
"testing"
9
10
"github.com/stretchr/testify/require"
@@ -50,6 +51,10 @@ func Test_Tun(t *testing.T) {
50
51
52
// Create TUN device success
53
err = tun.Create(path)
54
+ if err != nil && strings.HasSuffix(err.Error(), "operation not permitted") {
55
+ t.Skip("You do not have root privileges to create a TUN device, skipping test")
56
+ return
57
+ }
58
require.NoError(t, err)
59
60
// Check TUN device success
0 commit comments