chore(vpn): add check for empty public key for Wireguard

This commit is contained in:
Quentin McGaw
2022-06-12 15:41:02 +00:00
parent d4c6a9bdb5
commit 89b6a031b0
5 changed files with 17 additions and 4 deletions

View File

@@ -73,7 +73,7 @@ func Test_Provider_GetConnection(t *testing.T) {
},
"default Wireguard port": {
filteredServers: []models.Server{
{IPs: []net.IP{net.IPv4(1, 1, 1, 1)}},
{IPs: []net.IP{net.IPv4(1, 1, 1, 1)}, WgPubKey: "x"},
},
selection: settings.ServerSelection{
VPN: vpn.Wireguard,
@@ -83,6 +83,7 @@ func Test_Provider_GetConnection(t *testing.T) {
IP: net.IPv4(1, 1, 1, 1),
Port: 1194,
Protocol: constants.UDP,
PubKey: "x",
},
},
}