diff options
Diffstat (limited to 'network/wsNetwork_test.go')
-rw-r--r-- | network/wsNetwork_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/network/wsNetwork_test.go b/network/wsNetwork_test.go index 55f1e33a5..d1d719b36 100644 --- a/network/wsNetwork_test.go +++ b/network/wsNetwork_test.go @@ -2053,6 +2053,7 @@ type urlCase struct { } func TestParseHostOrURL(t *testing.T) { + partitiontest.PartitionTest(t) urlTestCases := []urlCase{ {"localhost:123", url.URL{Scheme: "http", Host: "localhost:123"}}, {"http://localhost:123", url.URL{Scheme: "http", Host: "localhost:123"}}, @@ -2067,6 +2068,7 @@ func TestParseHostOrURL(t *testing.T) { {"1.2.3.4:123", url.URL{Scheme: "http", Host: "1.2.3.4:123"}}, {"[::]:123", url.URL{Scheme: "http", Host: "[::]:123"}}, {"r2-devnet.devnet.algodev.network:4560", url.URL{Scheme: "http", Host: "r2-devnet.devnet.algodev.network:4560"}}, + {"::11.22.33.44:123", url.URL{Scheme: "http", Host: "::11.22.33.44:123"}}, } badUrls := []string{ "justahost", @@ -2078,6 +2080,15 @@ func TestParseHostOrURL(t *testing.T) { "//localhost:WAT", "://badaddress", // See rpcs/blockService_test.go TestRedirectFallbackEndpoints "://localhost:1234", + ":xxx", + ":xxx:1234", + "::11.22.33.44", + ":a:1", + ":a:", + ":1", + ":a", + ":", + "", } for _, tc := range urlTestCases { t.Run(tc.text, func(t *testing.T) { |