mirror of
https://github.com/qdm12/gluetun.git
synced 2026-07-25 20:06:25 +02:00
chore(updater): move updater packages to pkg/updaters/<name>
This commit is contained in:
@@ -4,8 +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/qdm12/gluetun/pkg/updaters/constants"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
@@ -21,7 +20,7 @@ func Test_getProtocol(t *testing.T) {
|
||||
},
|
||||
"OpenVPN UDP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.OpenVPN,
|
||||
VPN: constants.OpenVPN,
|
||||
OpenVPN: settings.OpenVPNSelection{
|
||||
Protocol: constants.UDP,
|
||||
},
|
||||
@@ -30,7 +29,7 @@ func Test_getProtocol(t *testing.T) {
|
||||
},
|
||||
"OpenVPN TCP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.OpenVPN,
|
||||
VPN: constants.OpenVPN,
|
||||
OpenVPN: settings.OpenVPNSelection{
|
||||
Protocol: constants.TCP,
|
||||
},
|
||||
@@ -39,7 +38,7 @@ func Test_getProtocol(t *testing.T) {
|
||||
},
|
||||
"Wireguard": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.Wireguard,
|
||||
VPN: constants.Wireguard,
|
||||
},
|
||||
protocol: constants.UDP,
|
||||
},
|
||||
@@ -67,21 +66,21 @@ func Test_filterByProtocol(t *testing.T) {
|
||||
}{
|
||||
"Wireguard and server has UDP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.Wireguard,
|
||||
VPN: constants.Wireguard,
|
||||
},
|
||||
serverUDP: true,
|
||||
filtered: false,
|
||||
},
|
||||
"Wireguard and server has not UDP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.Wireguard,
|
||||
VPN: constants.Wireguard,
|
||||
},
|
||||
serverUDP: false,
|
||||
filtered: true,
|
||||
},
|
||||
"OpenVPN UDP and server has UDP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.OpenVPN,
|
||||
VPN: constants.OpenVPN,
|
||||
OpenVPN: settings.OpenVPNSelection{
|
||||
Protocol: constants.UDP,
|
||||
},
|
||||
@@ -91,7 +90,7 @@ func Test_filterByProtocol(t *testing.T) {
|
||||
},
|
||||
"OpenVPN UDP and server has not UDP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.OpenVPN,
|
||||
VPN: constants.OpenVPN,
|
||||
OpenVPN: settings.OpenVPNSelection{
|
||||
Protocol: constants.UDP,
|
||||
},
|
||||
@@ -101,7 +100,7 @@ func Test_filterByProtocol(t *testing.T) {
|
||||
},
|
||||
"OpenVPN TCP and server has TCP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.OpenVPN,
|
||||
VPN: constants.OpenVPN,
|
||||
OpenVPN: settings.OpenVPNSelection{
|
||||
Protocol: constants.TCP,
|
||||
},
|
||||
@@ -111,7 +110,7 @@ func Test_filterByProtocol(t *testing.T) {
|
||||
},
|
||||
"OpenVPN TCP and server has not TCP": {
|
||||
selection: settings.ServerSelection{
|
||||
VPN: vpn.OpenVPN,
|
||||
VPN: constants.OpenVPN,
|
||||
OpenVPN: settings.OpenVPNSelection{
|
||||
Protocol: constants.TCP,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user