> + assertRequestHasCommonFields(server.takeRequest(), "POST",
> "/commit");
> + } finally {
> + dockerApi.close();
> + server.shutdown();
> + }
> + }
> +
> + public void testCommitNonExistingContainer() throws Exception {
> + MockWebServer server = mockWebServer();
> + server.enqueue(new MockResponse().setResponseCode(404));
> + DockerApi dockerApi = api(server.getUrl("/"));
> + ContainerApi api = dockerApi.getContainerApi();
> + try {
> + api.commit(CommitOptions.NONE);
> + fail("Commit container must fail on 404");
> + } catch (ResourceNotFoundException ex) {
don't test default fallbacks. This distracts the reader. Only test code you
wrote.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/113/files#r20875350