> @@ -403,6 +403,26 @@ public void testStartServerWhenResponseIs404() throws 
> Exception {
>        }
>     }
>  
> +   public void testGetConsolForServerWhenResponseIs2xx() throws Exception {
> +      String serverId = "123";
> +      HttpRequest getServerCosole = HttpRequest.builder()
> +            .method("POST")
> +            
> .endpoint("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v2/3456/servers/";
>  + serverId + "/action")
> +            .addHeader("Accept", "application/json")
> +            .addHeader("X-Auth-Token", authToken)
> +            .payload(payloadFromStringWithContentType(
> +                  "{\"os-getVNCConsole\":{\"type\":\"novnc\"}}", 
> "application/json"))
> +            .build();
> +
> +      HttpResponse getConsoleResponse = 
> HttpResponse.builder().statusCode(200)
> +            .payload(payloadFromResource("/server_console.json")).build();

I'm not the OpenStack expert here, but shouldn't this return the URL of the 
console (according to the live test)? Now a response from Keystone seems to be 
configured instead.
The test should produce the right response and a proper assertion should be 
added later to verify the value returned in the api call.

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

Reply via email to