File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
utils/src/test/java/com/cloud/utils Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -273,4 +273,16 @@ public void testIsUrlForCompressedFile() {
273273 Assert .assertTrue (UriUtils .isUrlForCompressedFile ("https://abc.com/xyz.gz" ));
274274 Assert .assertFalse (UriUtils .isUrlForCompressedFile ("http://abc.com/xyz.qcow2" ));
275275 }
276+
277+ @ Test
278+ public void validateUrl () {
279+ Pair <String , Integer > url1 = UriUtils .validateUrl ("https://www.cloudstack.org" );
280+ Assert .assertEquals (url1 .first (), "www.cloudstack.org" );
281+
282+ Pair <String , Integer > url2 = UriUtils .validateUrl ("https://www.apache.org" );
283+ Assert .assertEquals (url2 .first (), "www.apache.org" );
284+
285+ Pair <String , Integer > url3 = UriUtils .validateUrl ("https://ipv6.google.com" );
286+ Assert .assertEquals (url3 .first (), "ipv6.google.com" );
287+ }
276288}
You can’t perform that action at this time.
0 commit comments