jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Turli <notificati...@github.com>
Subject Re: [jclouds-labs] add docker NetworkAPI (#221)
Date Wed, 11 Nov 2015 10:29:39 GMT
> +
> +      try {
> +         api.removeNetwork(networkId);
> +         assertSent(server, "DELETE", "/networks/" + networkId);
> +
> +      } finally {
> +         server.shutdown();
> +      }
> +   }
> +
> +   public void testConnectContainerToNetwork() throws Exception {
> +      MockWebServer server = mockWebServer(new MockResponse().setResponseCode(200));
> +      NetworkApi api = api(DockerApi.class, server.getUrl("/").toString()).getNetworkApi();
> +      try {
> +         api.connectContainerToNetwork("1", "containerName");
> +         assertSent(server, "POST", "/networks/1/connect");

I think I was using `@Produces` annotation in a wrong way as I had to use `@Headers` for `Content-Type`
so I think it is now better. Sorry for the confusion!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/221/files#r44519204
Mime
View raw message