Better typeHostWithOptionalPort test

dev
Víctor Zamanillo 2022-12-08 21:08:10 +01:00
parent 5f02282468
commit c97c3aca33
1 changed files with 4 additions and 3 deletions

View File

@ -52,10 +52,11 @@ func TestConvertInputToType(t *testing.T) {
// host with optional port
{"google.com", typeHostWithOptionalPort, "", ""},
{"google.com:8443", typeHostWithOptionalPort, "google.com:8443", ""},
{"google.com:443", typeHostWithOptionalPort, "google.com:443", ""},
{"https://google.com", typeHostWithOptionalPort, "google.com:443", ""},
{"https://google.com:443", typeHostWithPort, "google.com:443", ""},
{"https://google.com:8443", typeHostWithPort, "google.com:8443", ""},
{"https://google.com:443", typeHostWithOptionalPort, "google.com:443", ""},
// host with optional port and default port
{"google.com", typeHostWithOptionalPort, "google.com:443", "443"},
// websocket
{"google.com", typeWebsocket, "", ""},