@@ -64,6 +64,13 @@ func TestBaseUrlOnlyHappyPath(t *testing.T) {
6464 {"https://a.b.c.d/1234" , "a.b.c.d" },
6565 {"https://a.b.c.d/1234/5678" , "a.b.c.d" },
6666 {"https://a.b.c.d.e/1234/" , "a.b.c.d.e" },
67+ {"https://a.b.c.d?e=1234" , "a.b.c.d" },
68+ {"https://a.b.c.d/rpc?e=1234" , "a.b.c.d" },
69+ {"wss://a.b.c.d/1234" , "a.b.c.d" },
70+ {"wss://a.b.c.d/1234/5678" , "a.b.c.d" },
71+ {"wss://a.b.c.d.e/1234/" , "a.b.c.d.e" },
72+ {"wss://a.b.c.d?e=1234" , "a.b.c.d" },
73+ {"wss://a.b.c.d/rpc?e=1234" , "a.b.c.d" },
6774 }
6875
6976 for _ , pair := range urls {
@@ -81,19 +88,3 @@ func TestBaseUrlOnlyHappyPath(t *testing.T) {
8188 }
8289 }
8390}
84-
85- func TestBaseUrlOnlyFailureCases (t * testing.T ) {
86-
87- urls := [... ]string {
88- "localhost:8545/asdfoij2a7831has89%342jddav98j2748" ,
89- "this-is-all-wrong" ,
90- }
91-
92- for _ , url := range urls {
93- baseUrl , err := BaseUrlOnly (url )
94-
95- if err == nil {
96- t .Errorf ("An error was expected, but received %s" , baseUrl )
97- }
98- }
99- }
0 commit comments