chore(config): use openvpn protocol string field instead of TCP bool

This commit is contained in:
Quentin McGaw
2024-03-23 14:56:42 +00:00
parent 62007bf1a1
commit 4d9c619b24
15 changed files with 49 additions and 81 deletions

View File

@@ -22,7 +22,6 @@ func Test_Provider_GetConnection(t *testing.T) {
const provider = providers.Wevpn
errTest := errors.New("test error")
boolPtr := func(b bool) *bool { return &b }
testCases := map[string]struct {
filteredServers []models.Server
@@ -45,7 +44,7 @@ func Test_Provider_GetConnection(t *testing.T) {
},
selection: settings.ServerSelection{
OpenVPN: settings.OpenVPNSelection{
TCP: boolPtr(true),
Protocol: constants.TCP,
},
}.WithDefaults(provider),
connection: models.Connection{
@@ -61,7 +60,7 @@ func Test_Provider_GetConnection(t *testing.T) {
},
selection: settings.ServerSelection{
OpenVPN: settings.OpenVPNSelection{
TCP: boolPtr(false),
Protocol: constants.UDP,
},
}.WithDefaults(provider),
connection: models.Connection{