> + return result;
> + }
> +
> + protected Payload createPayload() throws IOException {
> + String folderPath = System.getProperty("user.dir") +
> "/docker/src/test/resources";
> + File parentDir = new File(folderPath + "/archive");
> + parentDir.mkdirs();
> + URL url = Resources.getResource("Dockerfile");
> + String content = Resources.toString(url, Charsets.UTF_8);
> + final File dockerfile = new File(parentDir.getAbsolutePath() +
> File.separator + "Dockerfile");
> + Files.write(content.getBytes(), dockerfile);
> + File archive = Archives.tar(parentDir, folderPath +
> "/archive/archive.tar");
> + FileInputStream data = new FileInputStream(archive);
> + Payload payload = Payloads.newInputStreamPayload(data);
> +
> payload.getContentMetadata().setContentLength(data.getChannel().size());
> + payload.getContentMetadata().setContentType(MediaType.TEXT_PLAIN);
Same as commented above. Is this the right media type? Note that it doesn't
match the ones defined in the `RemoteApi.build` methods.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/57/files#r12937709