> +    @Test
> +    public void testGetVNCConsole() {
> +        for (String zoneId : api.getConfiguredZones()) {
> +            Optional<? extends ConsolesApi> apiOption = 
> api.getConsolesExtensionForZone(zoneId);
> +            if (!apiOption.isPresent())
> +                continue;
> +
> +            ConsolesApi api = apiOption.get();
> +            ServerApi serverApi = this.api.getServerApiForZone(zoneId);
> +            Server server = createServerInZone(zoneId);
> +            Console console = api.getConsole(server.getId(), 
> Console.Type.NOVNC);
> +            assertNotNull(console);
> +            assertNotNull(console.getType());
> +            assertTrue(Console.Type.NOVNC.equals(console.getType()));
> +            assertNotNull(console.getUrl());
> +            assertTrue(console.getUrl().toString().startsWith("http"));

Well the "novnc" console is either http or https url, so if it's something 
different then something is wrong (either our parsing logic, or the server). On 
the other side, I don't think it's likely to be brittle, but it doesn't hurt to 
test it.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/339/files#r13038799

Reply via email to