> + public void testListContainers() throws Exception {
> + 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();
> + assertRequestHasCommonFields(server.takeRequest(),
> "/containers/json");
> + 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#r12937911