summaryrefslogtreecommitdiff
path: root/pkg/vpn/bonafide/gateways_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/vpn/bonafide/gateways_test.go')
-rw-r--r--pkg/vpn/bonafide/gateways_test.go8
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")
}