Merge pull request #1575 from rackspace/cloudservers-live-tests

Fixes live rackspace tests
This commit is contained in:
Adrian Cole 2013-04-29 12:53:24 -07:00
commit 8c64988ce9
2 changed files with 5 additions and 8 deletions

View File

@ -47,7 +47,6 @@ import static org.jclouds.util.Predicates2.retry;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.fail; import static org.testng.Assert.fail;
import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@ -62,7 +61,6 @@ import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException; import java.util.concurrent.TimeoutException;
import org.jclouds.compute.ComputeService; import org.jclouds.compute.ComputeService;
import org.jclouds.compute.ComputeServiceContext; import org.jclouds.compute.ComputeServiceContext;
import org.jclouds.compute.ComputeTestUtils; import org.jclouds.compute.ComputeTestUtils;
@ -96,7 +94,6 @@ import org.jclouds.ssh.SshException;
import org.testng.annotations.AfterClass; import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeGroups; import org.testng.annotations.BeforeGroups;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.base.Predicates; import com.google.common.base.Predicates;

View File

@ -53,13 +53,13 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
public boolean apply(OsFamilyVersion64Bit input) { public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) { switch (input.family) {
case UBUNTU: case UBUNTU:
return (input.version.equals("") || (input.version.matches("^1[012].*") && !input.version return (input.version.equals("") || (input.version.matches("^1[012].*") && !input.version.equals("11.04") && !input.version
.equals("10.10"))) .equals("10.10")))
&& input.is64Bit; && input.is64Bit;
case DEBIAN: case DEBIAN:
return input.is64Bit && !input.version.equals("5.0"); return input.is64Bit && !input.version.equals("5.0");
case CENTOS: case CENTOS:
return (input.version.equals("") || input.version.equals("5.6") || input.version.equals("6.0")) return (input.version.equals("") || input.version.equals("5.6") || input.version.equals("6.0") || input.version.equals("5.0"))
&& input.is64Bit; && input.is64Bit;
case WINDOWS: case WINDOWS:
return input.is64Bit && input.version.equals(""); return input.is64Bit && input.version.equals("");
@ -79,9 +79,9 @@ public class CloudServersUSTemplateBuilderLiveTest extends BaseTemplateBuilderLi
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU); assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
assertEquals(defaultTemplate.getImage().getName(), "Ubuntu 12.04 LTS (Precise Pangolin)"); assertEquals(defaultTemplate.getImage().getName(), "Ubuntu 12.04 LTS (Precise Pangolin)");
assertEquals(defaultTemplate.getImage().getDefaultCredentials().getUser(), "root"); assertEquals(defaultTemplate.getImage().getDefaultCredentials().getUser(), "root");
assertEquals(defaultTemplate.getLocation().getId(), "ORD"); assertEquals(defaultTemplate.getLocation().getId(), "DFW");
assertEquals(defaultTemplate.getImage().getLocation().getId(), "ORD"); assertEquals(defaultTemplate.getImage().getLocation().getId(), "DFW");
assertEquals(defaultTemplate.getHardware().getLocation().getId(), "ORD"); assertEquals(defaultTemplate.getHardware().getLocation().getId(), "DFW");
assertEquals(defaultTemplate.getOptions().as(NovaTemplateOptions.class).shouldAutoAssignFloatingIp(), false); assertEquals(defaultTemplate.getOptions().as(NovaTemplateOptions.class).shouldAutoAssignFloatingIp(), false);
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d); assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
} }