feat(openvpn): OPENVPN_PROCESS_USER and deprecates OPENVPN_ROOT

This commit is contained in:
Quentin McGaw
2022-01-27 23:34:19 +00:00
parent 1b585159d1
commit 7a8f5f53d5
26 changed files with 80 additions and 82 deletions

View File

@@ -10,7 +10,6 @@ import (
"github.com/stretchr/testify/assert"
)
func boolPtr(b bool) *bool { return &b }
func intPtr(n int) *int { return &n }
func uint16Ptr(n uint16) *uint16 { return &n }
func stringPtr(s string) *string { return &s }
@@ -36,14 +35,13 @@ func Test_modifyConfig(t *testing.T) {
"auth bla",
},
settings: settings.OpenVPN{
User: "user",
Ciphers: []string{"cipher"},
Auth: stringPtr("auth"),
MSSFix: uint16Ptr(1000),
Root: boolPtr(false),
ProcUser: "procuser",
Interface: "tun3",
Verbosity: intPtr(0),
User: "user",
Ciphers: []string{"cipher"},
Auth: stringPtr("auth"),
MSSFix: uint16Ptr(1000),
ProcessUser: "procuser",
Interface: "tun3",
Verbosity: intPtr(0),
}.WithDefaults(constants.Custom),
connection: models.Connection{
IP: net.IPv4(1, 2, 3, 4),