From 38c836011b5f62d6e5c13b70b5b729cc79c83448 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Mon, 6 Dec 2021 09:31:06 +0100 Subject: [PATCH] Update tests for new continent map. --- geoip_test.go | 2 +- mcu_proxy_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/geoip_test.go b/geoip_test.go index a0ef7b6..eba29f0 100644 --- a/geoip_test.go +++ b/geoip_test.go @@ -104,7 +104,7 @@ func TestGeoLookupContinent(t *testing.T) { tests := map[string][]string{ "AU": {"OC"}, "DE": {"EU"}, - "RU": {"EU", "AS"}, + "RU": {"EU"}, "": nil, "INVALID ": nil, } diff --git a/mcu_proxy_test.go b/mcu_proxy_test.go index 1232602..e518e6d 100644 --- a/mcu_proxy_test.go +++ b/mcu_proxy_test.go @@ -67,10 +67,10 @@ func Test_sortConnectionsForCountry(t *testing.T) { {conn_de, conn_jp, conn_at}, {conn_jp, conn_de, conn_at}, }, - // Partial continent match + // Continent match "RU": { {conn_us, conn_de, conn_jp, conn_at}, - {conn_de, conn_jp, conn_at, conn_us}, + {conn_de, conn_at, conn_us, conn_jp}, }, // No match "AU": { @@ -125,10 +125,10 @@ func Test_sortConnectionsForCountryWithOverride(t *testing.T) { {conn_de, conn_jp, conn_at}, {conn_jp, conn_de, conn_at}, }, - // Partial continent match + // Continent match "RU": { {conn_us, conn_de, conn_jp, conn_at}, - {conn_de, conn_jp, conn_at, conn_us}, + {conn_de, conn_at, conn_us, conn_jp}, }, // No match "AR": {