> + if(sgr.getId().equals(securityGroupRule.getId())) {
> + newSecGroupRule = sgr;
> + break;
> + }
> + }
> + assertNotNull(newSecGroupRule, "Did not find the new rule in the
> group.");
> +
> + assertEquals(securityGroupRule, newSecGroupRule);
> +
> + assertEquals(securityGroupRule.getEthertype(),
> SecurityGroupRuleEthertype.IPV6);
> + assertEquals(securityGroupRule.getProtocol(),
> SecurityGroupRuleProtocol.TCP);
> + assertEquals(securityGroupRule.getPortRangeMax().intValue(), 90);
> + assertEquals(securityGroupRule.getPortRangeMin().intValue(), 80);
> + assertEquals(securityGroupRule.getDirection(),
> SecurityGroupRuleDirection.EGRESS);
> +
> + assertTrue(sgrApi.delete(securityGroupRule.getId()));
Move the cleanup to a `finally` block or an `afterClass` method that always
runs.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/132/files#r16708609