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 09:53:10 GMT
> +   public void testGetNetwork() {
> +      network = api().inspectNetwork(network.id());
> +      assertNotNull(network);
> +   }
> +
> +   @Test(dependsOnMethods = "testGetNetwork")
> +   public void testAttachContainerToNetwork() {
> +      api().connectContainerToNetwork(network.id(), container.id());
> +      Container foundContainer = api.getContainerApi().inspectContainer(container.id());
> +      assertNotNull(Iterables.tryFind(foundContainer.networkSettings().networks().keySet(),
Predicates.equalTo(network.name())).orNull());
> +   }
> +
> +   @Test(dependsOnMethods = "testAttachContainerToNetwork")
> +   public void testDisconnectContainerFromNetwork() {
> +      api().disconnectContainerFromNetwork(network.id(), container.id());
> +      // TODO assertion

ops :)

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