jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs] add docker NetworkAPI (#221)
Date Tue, 10 Nov 2015 21:32:05 GMT
> +      assertNotNull(network);
> +      assertNotNull(network.id());
> +
> +   }
> +
> +   @Test(dependsOnMethods = "testCreateNetwork")
> +   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());

Would it be more readable as `assertTrue(Iterables.any(...)` ?

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