Add trailing slash to Atmos listDirectories

This is more consistent with examples in the Atmos programmer's guide
and allows this operation to succeed when used with ViPR.
This commit is contained in:
Andrew Gaul 2013-08-29 15:56:16 -07:00
parent de8ab57072
commit b80bb48be3
2 changed files with 3 additions and 2 deletions

View File

@ -92,6 +92,7 @@ public interface AtmosAsyncClient extends Closeable {
*/
@Named("ListDirectory")
@GET
@Path("/")
@ResponseParser(ParseDirectoryListFromContentAndHeaders.class)
@Consumes(MediaType.TEXT_XML)
ListenableFuture<BoundedSet<? extends DirectoryEntry>> listDirectories(ListOptions... options);

View File

@ -71,7 +71,7 @@ public class AtmosAsyncClientTest extends BaseAsyncClientTest<AtmosAsyncClient>
Invokable<?, ?> method = method(AtmosAsyncClient.class, "listDirectories", ListOptions[].class);
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.of());
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\n");
assertPayloadEquals(request, null, null, false);
@ -101,7 +101,7 @@ public class AtmosAsyncClientTest extends BaseAsyncClientTest<AtmosAsyncClient>
Invokable<?, ?> method = method(AtmosAsyncClient.class, "listDirectories", ListOptions[].class);
GeneratedHttpRequest request = processor.createRequest(method, ImmutableList.<Object> of(new ListOptions().limit(1).token("asda")));
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace HTTP/1.1");
assertRequestLineEquals(request, "GET https://accesspoint.atmosonline.com/rest/namespace/ HTTP/1.1");
assertNonPayloadHeadersEqual(request, HttpHeaders.ACCEPT + ": text/xml\nx-emc-limit: 1\nx-emc-token: asda\n");
assertPayloadEquals(request, null, null, false);