diff options
author | Ruben Pollan <meskio@sindominio.net> | 2021-03-30 16:48:38 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-05-04 14:58:39 +0200 |
commit | aae83bfac7005e303193acaef7b69497a0f323c0 (patch) | |
tree | 159231f04ddb9c59fe79dae048d64a06d3285765 /pkg/vpn/bonafide/gateways_test.go | |
parent | ed529ab770ae4dc6dd79bbf819f8cf1b2dfb809b (diff) |
Fetch the gateways from menshen
And use the fullness to display the status.
Diffstat (limited to 'pkg/vpn/bonafide/gateways_test.go')
-rw-r--r-- | pkg/vpn/bonafide/gateways_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/vpn/bonafide/gateways_test.go b/pkg/vpn/bonafide/gateways_test.go index 1266c8f..41bf28d 100644 --- a/pkg/vpn/bonafide/gateways_test.go +++ b/pkg/vpn/bonafide/gateways_test.go @@ -62,17 +62,17 @@ func TestGatewayPool(t *testing.T) { t.Fatal("userChoice should be empty after auto selection") } - gw, err := pool.getRandomGatewayByLocation("foo", "openvpn") + _, err = pool.getRandomGatewaysByLocation("foo", "openvpn") if err == nil { t.Fatal("should get an error with invalid label") } - gw, err = pool.getRandomGatewayByLocation("a", "openvpn") - if gw.IPAddress != "1.1.1.1" { + gws, err := pool.getRandomGatewaysByLocation("a", "openvpn") + if gws[0].IPAddress != "1.1.1.1" { t.Fatal("expected to get gw 1.1.1.1 with label a") } - gw, err = pool.getGatewayByIP("1.1.1.1") + gw, err := pool.getGatewayByIP("1.1.1.1") if err != nil { t.Fatal("expected to get gw a with ip 1.1.1.1") } |