diff options
-rw-r--r-- | pkg/config/config.go | 1 | ||||
-rw-r--r-- | pkg/vpn/bonafide/gateways.go | 2 | ||||
-rw-r--r-- | pkg/vpn/bonafide/gateways_test.go | 12 |
3 files changed, 8 insertions, 7 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go index 4cce98d..24a88fb 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -7,4 +7,5 @@ var ( Auth = "" APIURL = "" GeolocationAPI = "" +) var CaCert = []byte("") diff --git a/pkg/vpn/bonafide/gateways.go b/pkg/vpn/bonafide/gateways.go index f454d3c..8bfcee0 100644 --- a/pkg/vpn/bonafide/gateways.go +++ b/pkg/vpn/bonafide/gateways.go @@ -40,7 +40,7 @@ type gatewayPool struct { available []Gateway userChoice []byte /* ranked is, for now, just an array of hostnames (fetched from the - geoip service). it should be a map in the future, to keep track of + menshen service). it should be a map in the future, to keep track of quantitative metrics */ ranked []string diff --git a/pkg/vpn/bonafide/gateways_test.go b/pkg/vpn/bonafide/gateways_test.go index b88423f..42a7a95 100644 --- a/pkg/vpn/bonafide/gateways_test.go +++ b/pkg/vpn/bonafide/gateways_test.go @@ -37,28 +37,28 @@ func TestGatewayPool(t *testing.T) { t.Fatal("gatewayPool labels not what expected. Got:", labels) } - if pool.userChoice != "" { + if pool.userChoice != nil { t.Fatal("userChoice should be empty by default") } - err = pool.setUserChoice("foo") + err = pool.setUserChoice([]byte("foo")) if err == nil { t.Fatal("gatewayPool should not let you set a foo gateway") } - err = pool.setUserChoice("a-1") + err = pool.setUserChoice([]byte("a-1")) if err != nil { t.Fatal("location 'a-1' should be a valid label") } - err = pool.setUserChoice("c-2") + err = pool.setUserChoice([]byte("c-2")) if err != nil { t.Fatal("location 'c-2' should be a valid label") } - if pool.userChoice != "c-2" { + if string(pool.userChoice) != "c-2" { t.Fatal("userChoice should be c-2") } pool.setAutomaticChoice() - if pool.userChoice != "" { + if string(pool.userChoice) != "" { t.Fatal("userChoice should be empty after auto selection") } |