chore(constants): internal/constants/vpn package

This commit is contained in:
Quentin McGaw
2022-04-18 09:15:20 +00:00
parent d51514015f
commit 934fafb64b
25 changed files with 193 additions and 183 deletions

View File

@@ -4,7 +4,7 @@ import (
"testing"
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/constants/vpn"
"github.com/stretchr/testify/assert"
)
@@ -30,7 +30,7 @@ func Test_GetPort(t *testing.T) {
},
"OpenVPN UDP": {
selection: settings.ServerSelection{
VPN: constants.OpenVPN,
VPN: vpn.OpenVPN,
OpenVPN: settings.OpenVPNSelection{
CustomPort: uint16Ptr(0),
TCP: boolPtr(false),
@@ -40,7 +40,7 @@ func Test_GetPort(t *testing.T) {
},
"OpenVPN TCP": {
selection: settings.ServerSelection{
VPN: constants.OpenVPN,
VPN: vpn.OpenVPN,
OpenVPN: settings.OpenVPNSelection{
CustomPort: uint16Ptr(0),
TCP: boolPtr(true),
@@ -50,7 +50,7 @@ func Test_GetPort(t *testing.T) {
},
"OpenVPN custom port": {
selection: settings.ServerSelection{
VPN: constants.OpenVPN,
VPN: vpn.OpenVPN,
OpenVPN: settings.OpenVPNSelection{
CustomPort: uint16Ptr(1234),
},
@@ -59,13 +59,13 @@ func Test_GetPort(t *testing.T) {
},
"Wireguard": {
selection: settings.ServerSelection{
VPN: constants.Wireguard,
VPN: vpn.Wireguard,
}.WithDefaults(""),
port: defaultWireguard,
},
"Wireguard custom port": {
selection: settings.ServerSelection{
VPN: constants.Wireguard,
VPN: vpn.Wireguard,
Wireguard: settings.WireguardSelection{
EndpointPort: uint16Ptr(1234),
},