mirror of https://github.com/apache/jclouds.git
fixed gogrid test
This commit is contained in:
parent
2bddd8e70f
commit
b221f8006f
|
@ -119,7 +119,13 @@ public abstract class BaseComputeServiceLiveTest {
|
|||
|
||||
abstract protected Module getSshModule();
|
||||
|
||||
@Test(enabled = true)
|
||||
public void testTemplateMatch() throws Exception {
|
||||
template = buildTemplate(client.templateBuilder());
|
||||
Template toMatch = client.templateBuilder().imageId(template.getImage().getId()).build();
|
||||
assertEquals(toMatch, template);
|
||||
}
|
||||
|
||||
@Test(dependsOnMethods = "testTemplateMatch")
|
||||
public void testCreate() throws Exception {
|
||||
try {
|
||||
client.destroyNodesWithTag(tag);
|
||||
|
@ -130,11 +136,8 @@ public abstract class BaseComputeServiceLiveTest {
|
|||
}
|
||||
template = buildTemplate(client.templateBuilder());
|
||||
|
||||
template
|
||||
.getOptions()
|
||||
.installPrivateKey(keyPair.get("private"))
|
||||
.authorizePublicKey(keyPair.get("public"))
|
||||
.runScript(buildScript().getBytes());
|
||||
template.getOptions().installPrivateKey(keyPair.get("private")).authorizePublicKey(
|
||||
keyPair.get("public")).runScript(buildScript().getBytes());
|
||||
nodes = Sets.newTreeSet(client.runNodesWithTag(tag, 2, template).values());
|
||||
assertEquals(nodes.size(), 2);
|
||||
checkNodes();
|
||||
|
@ -170,8 +173,7 @@ public abstract class BaseComputeServiceLiveTest {
|
|||
protected abstract Template buildTemplate(TemplateBuilder templateBuilder);
|
||||
|
||||
protected String buildScript() {
|
||||
return
|
||||
new StringBuilder()//
|
||||
return new StringBuilder()//
|
||||
.append("echo nameserver 208.67.222.222 >> /etc/resolv.conf\n")//
|
||||
.append("cp /etc/apt/sources.list /etc/apt/sources.list.old\n")//
|
||||
.append(
|
||||
|
|
|
@ -55,15 +55,13 @@ public class GoGridComputeServiceLiveTest extends BaseComputeServiceLiveTest {
|
|||
@Override
|
||||
public String buildScript() {
|
||||
return new StringBuilder()
|
||||
//
|
||||
.append("echo nameserver 208.67.222.222 >> /etc/resolv.conf\n")
|
||||
//
|
||||
.append("echo \"[jdkrepo]\" >> /etc/yum.repos.d/CentOS-Base.repo\n")
|
||||
.append("echo \"name=jdkrepository\" >> /etc/yum.repos.d/CentOS-Base.repo\n")
|
||||
.append(
|
||||
"echo \"baseurl=http://ec2-us-east-mirror.rightscale.com/epel/5/i386/\" >> /etc/yum.repos.d/CentOS-Base.repo\n")
|
||||
.append("echo \"enabled=1\" >> /etc/yum.repos.d/CentOS-Base.repo\n")
|
||||
.append("yum -y install java-1.6.0-openjdk\n")
|
||||
.append("yum --nogpgcheck -y install java-1.6.0-openjdk\n")
|
||||
.append(
|
||||
"echo \"export PATH=\\\"/usr/lib/jvm/jre-1.6.0-openjdk/bin/:\\$PATH\\\"\" >> /root/.bashrc\n")
|
||||
.toString();
|
||||
|
|
Loading…
Reference in New Issue