> + public void testUpdateWhenReponseIs404IsNull() throws Exception {
> + HttpRequest patch = HttpRequest.builder().method("PATCH")
> +
> .endpoint("https://glance.jclouds.org:9292/v2/images/da3b75d9-3f4a-40e7-8a2c-bfab23927dea")
> +
> .payload(payloadFromStringWithContentType("[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"new-image-name\"}]",
> "application/openstack-images-v2.0-json-patch"))
> + .addHeader("Accept",
> MediaType.APPLICATION_JSON).addHeader("X-Auth-Token", authToken).build();
> +
> + HttpResponse getResponse =
> HttpResponse.builder().statusCode(404).build();
> +
> + GlanceApi apiWhenNoExist =
> requestsSendResponses(keystoneAuthWithUsernameAndPassword,
> responseWithKeystoneAccess,
> + patch, getResponse);
> +
> +
> assertNull(apiWhenNoExist.getImageApiForZone("az-1.region-a.geo-1").update(
> + "da3b75d9-3f4a-40e7-8a2c-bfab23927dea",
> UpdateImageOptions.Builder.property(Operation.REPLACE, "name",
> "new-image-name")));
> + }
> +
> + public void testCreateWhenResponseIs2xx() throws Exception {
If you guys prefer the names in that way, I can update those. Is there any
convention to follow regarding the naming? :)
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/77/files#r10192314