updated cloudsigma tests

This commit is contained in:
Adrian Cole 2012-09-16 23:39:55 -07:00
parent bff49f8311
commit 3d2504e1e4
2 changed files with 28 additions and 21 deletions

View File

@ -25,12 +25,13 @@ import org.jclouds.sshj.config.SshjSshClientModule;
import org.testng.annotations.Test;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Module;
/**
* @author Adrian Cole
*/
@Test(groups = "live")
@Test(groups = "live", testName = "CloudSigmaComputeServiceLiveTest")
public class CloudSigmaComputeServiceLiveTest extends BaseComputeServiceLiveTest {
public CloudSigmaComputeServiceLiveTest() {
@ -46,14 +47,21 @@ public class CloudSigmaComputeServiceLiveTest extends BaseComputeServiceLiveTest
@Override
protected void checkUserMetadataInNodeEquals(NodeMetadata node, ImmutableMap<String, String> userMetadata) {
assert node.getUserMetadata().equals(ImmutableMap.<String, String> of()) : String.format(
"node userMetadata did not match %s %s", userMetadata, node);
"node userMetadata did not match %s %s", userMetadata, node);
}
// cloudsigma does not support tags
@Override
protected void checkTagsInNodeEquals(final NodeMetadata node, final ImmutableSet<String> tags) {
assert node.getTags().equals(ImmutableSet.<String> of()) : String.format("node tags did not match %s %s", tags,
node);
}
protected void checkResponseEqualsHostname(ExecResponse execResponse, NodeMetadata node1) {
// hostname is not predictable based on node metadata
assert execResponse.getOutput().trim().equals("ubuntu");
}
@Override
public void testOptionToNotBlock() {
// start call has to block until we have a pool of reserved pre-cloned drives.

View File

@ -51,23 +51,22 @@ public class CloudSigmaLasVegasTemplateBuilderLiveTest extends BaseTemplateBuild
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("11.04") && input.is64Bit)
|| (input.version.equals("11.10") && !input.is64Bit) || input.version.equals("")
|| input.version.equals("10.04");
case SOLARIS:
return input.version.equals("") && input.is64Bit;
case DEBIAN:
return false;
case CENTOS:
return (input.version.equals("") || input.version.equals("5.7") || input.version.equals("6.0"))
&& input.is64Bit;
case WINDOWS:
return (input.version.equals("2008 R2") || (input.version.equals("2003") || input.version.equals(""))
&& input.is64Bit)
|| (input.version.equals("") && !input.is64Bit);
default:
return false;
case UBUNTU:
return (ImmutableSet.of("11.04", "10.10").contains(input.version) && input.is64Bit)
|| (input.version.equals("11.10") && !input.is64Bit) || input.version.equals("")
|| input.version.equals("10.04") || input.version.equals("12.04");
case SOLARIS:
return (input.version.equals("") || input.version.equals("10")) && input.is64Bit;
case DEBIAN:
return input.version.equals("") || (input.version.equals("5.0") && !input.is64Bit)
|| (input.version.equals("6.0") && input.is64Bit);
case CENTOS:
return (input.version.equals("") || input.version.equals("5.5") || input.version.equals("5.7") || input.version
.equals("6.0")) && input.is64Bit;
case WINDOWS:
return input.version.equals("2008") || input.version.equals("2003") || input.version.equals("");
default:
return false;
}
}