chore(updater): move updater packages to pkg/updaters/<name>

This commit is contained in:
Quentin McGaw
2026-04-23 03:47:57 +00:00
parent 5b01324d5f
commit 13503b0ae0
268 changed files with 1602 additions and 1026 deletions
+10 -11
View File
@@ -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,
},