> + MockWebServer server = mockWebServer();
> + server.enqueue(new
> MockResponse().setBody(payloadFromResource("/containers.json")));
> +
> + DockerApi api = api(server.getUrl("/"));
> + RemoteApi remoteApi = api.getRemoteApi();
> +
> + try {
> + Set<Container> containers =
> remoteApi.listContainers(ListContainerOptions.Builder.all(true));
> + assertRequestHasParameters(server.takeRequest(),
> "/containers/json", ImmutableMultimap.of("all",
> + "true"));
> + assertEquals(containers.size(), 1);
> + } finally {
> + api.close();
> + server.shutdown();
> + }
> + }
Add the corresponding test when the response is a 404 (to verify the fallback
configured in the api).
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/57/files#r12937917