> @@ -189,6 +189,23 @@ public void testCreateWithOptions() throws Exception {
> }
> }
>
> + public void testCreateWithSpacesAndSpecialCharacters() throws Exception {
> + MockWebServer server = mockOpenStackServer();
> + server.enqueue(addCommonHeaders(new
> MockResponse().setBody(stringFromResource("/access.json"))));
> + server.enqueue(addCommonHeaders(new
> MockResponse().setResponseCode(201)));
> +
> + try {
> + SwiftApi api = api(server.getUrl("/").toString(),
> "openstack-swift");
> + assertTrue(api.getContainerApiForRegion("DFW").create("container #
> ! special"));
> +
> + assertEquals(server.getRequestCount(), 2);
> + assertAuthentication(server);
> + assertRequest(server.takeRequest(), "PUT",
> "/v1/MossoCloudFS_5bcf396e-39dd-45ff-93a1-712b9aba90a9/container%20%23%20%21%20special");
Any way to calculate the expected string, rather than hardcoding that? That
might also make it easier for readers of the test to see which kind of encoding
is supposed to be happening here..?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/104/files#r13033675