> + .addHeader("ETag", "8a964ee2a5e88be344f36c22562a6486")
> + // TODO: MWS doesn't allow you to return content length w/o
> content
> + // on HEAD!
> + .setBody("ABCD".getBytes(US_ASCII))
> + .addHeader("Content-Length", "4").addHeader("Content-Type",
> "text/plain; charset=UTF-8");
> + }
> +
> + private static final byte[] NO_CONTENT = new byte[] {};
> +
> + private static Payload payload(long bytes, String contentType) {
> + Payload payload = Payloads.newByteArrayPayload(NO_CONTENT);
> + payload.getContentMetadata().setContentLength(bytes);
> + payload.getContentMetadata().setContentType(contentType);
> + return payload;
> + }
> +}
Most tests only test the happy path, and there is only one test that asserts
the proper behavior on failure, in the "get" test. Add tests for failed
responses in all methods.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/79/files#r9779206