check for no regions

This commit is contained in:
danikov 2011-11-16 09:54:14 +00:00
parent e1547f5853
commit 074f5ffbe7
1 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import org.jclouds.cloudloadbalancers.domain.LoadBalancerRequest;
import org.jclouds.cloudloadbalancers.domain.NodeRequest; import org.jclouds.cloudloadbalancers.domain.NodeRequest;
import org.jclouds.cloudloadbalancers.domain.VirtualIP.Type; import org.jclouds.cloudloadbalancers.domain.VirtualIP.Type;
import org.testng.annotations.AfterGroups; import org.testng.annotations.AfterGroups;
import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
@ -44,6 +45,12 @@ import com.google.common.collect.Sets;
public class LoadBalancerClientLiveTest extends BaseCloudLoadBalancersClientLiveTest { public class LoadBalancerClientLiveTest extends BaseCloudLoadBalancersClientLiveTest {
private Set<LoadBalancer> lbs = Sets.newLinkedHashSet(); private Set<LoadBalancer> lbs = Sets.newLinkedHashSet();
@BeforeGroups(groups = "live")
protected void setup() {
assertTrue(client.getConfiguredRegions().size() > 0, "Need to have some regions!");
Logger.getAnonymousLogger().info("running against regions "+client.getConfiguredRegions());
}
@AfterGroups(groups = "live") @AfterGroups(groups = "live")
protected void tearDown() { protected void tearDown() {
for (LoadBalancer lb : lbs) { for (LoadBalancer lb : lbs) {