chore: simplify provider GetConnection

This commit is contained in:
Quentin McGaw
2022-04-19 14:28:57 +00:00
parent 306d8494d6
commit 0c0f1663b1
36 changed files with 243 additions and 707 deletions

View File

@@ -29,7 +29,7 @@ func Test_Wevpn_GetConnection(t *testing.T) {
VPN: vpn.OpenVPN,
}.WithDefaults(providers.Wevpn),
errWrapped: utils.ErrNoServerFound,
errMessage: "no server found: for VPN openvpn; protocol udp",
errMessage: "cannot filter servers: no server found: for VPN openvpn; protocol udp",
},
"no filter": {
servers: []models.Server{
@@ -74,6 +74,7 @@ func Test_Wevpn_GetConnection(t *testing.T) {
Type: vpn.OpenVPN,
IP: net.IPv4(2, 2, 2, 2),
Port: 1194,
Hostname: "b",
Protocol: constants.UDP,
},
},