Issue 645: go2cloud now passes all but one test

This commit is contained in:
Adrian Cole 2011-09-27 12:52:28 -07:00
parent 2bbb5dbadf
commit 85a54e82bc
4 changed files with 25 additions and 9 deletions

View File

@ -18,7 +18,7 @@
*/
package org.jclouds.go2cloud.config;
import static org.jclouds.compute.domain.OsFamily.DEBIAN;
import static org.jclouds.compute.domain.OsFamily.UBUNTU;
import org.jclouds.compute.domain.TemplateBuilder;
import org.jclouds.elasticstack.compute.config.ElasticStackComputeServiceContextModule;
@ -33,6 +33,6 @@ public class Go2CloudJohannesburg1ComputeServiceContextModule extends ElasticSta
@Override
protected TemplateBuilder provideTemplate(Injector injector, TemplateBuilder template) {
return template.osFamily(DEBIAN).osVersionMatches("6.0").os64Bit(true);
return template.osFamily(UBUNTU).osVersionMatches("10.10").os64Bit(true);
}
}

View File

@ -1,4 +1,11 @@
[
{
"uuid": "14c88d27-1f5e-4ad5-9f3a-28e5d2282f61",
"description": "Ubuntu 10.10",
"osFamily": "UBUNTU",
"osVersion": "10.10",
"size": "1"
},
{
"uuid": "cc54132d-4912-4106-a91a-7a27e6866c8b",
"description": "Debian 6.0.2.1",
@ -7,10 +14,17 @@
"size": "1"
},
{
"uuid": "46e305b6-6a49-409c-bd12-eb966cdb3664",
"description": "Windows 2008 R2 with SP1 (x64)",
"uuid": "77ad0ffe-9537-4c64-a8e3-10db185261c0",
"description": "Windows 2008 R2 (x64) with SP1",
"osFamily": "WINDOWS",
"osVersion": "2008 R2",
"size": "13"
},
{
"uuid": "d971ddfb-7a69-48f7-8d14-a76ef61b01d8",
"description": "Windows 8 Developer Preview (x64)",
"osFamily": "WINDOWS",
"osVersion": "8",
"size": "13"
}
]
]

View File

@ -25,10 +25,10 @@ import org.testng.annotations.Test;
*
* @author Adrian Cole
*/
@Test(groups = "live", sequential = true)
@Test(groups = "live", singleThreaded = true)
public class Go2CloudJohannesburg1ClientLiveTest extends ElasticStackClientLiveTest {
public Go2CloudJohannesburg1ClientLiveTest() {
provider = "go2cloud-jhb1";
bootDrive = "5192adbd-046f-4a48-90f9-3db390b1efab";
bootDrive = "14c88d27-1f5e-4ad5-9f3a-28e5d2282f61";
}
}

View File

@ -52,6 +52,8 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu
@Override
public boolean apply(OsFamilyVersion64Bit input) {
switch (input.family) {
case UBUNTU:
return (input.version.equals("") || input.version.equals("10.10")) && input.is64Bit;
case DEBIAN:
return (input.version.equals("") || input.version.equals("6.0")) && input.is64Bit;
case WINDOWS:
@ -68,8 +70,8 @@ public class Go2CloudJohannesburg1TemplateBuilderLiveTest extends BaseTemplateBu
public void testDefaultTemplateBuilder() throws IOException {
Template defaultTemplate = this.context.getComputeService().templateBuilder().build();
assertEquals(defaultTemplate.getImage().getOperatingSystem().is64Bit(), true);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "6.0");
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.DEBIAN);
assertEquals(defaultTemplate.getImage().getOperatingSystem().getVersion(), "10.10");
assertEquals(defaultTemplate.getImage().getOperatingSystem().getFamily(), OsFamily.UBUNTU);
assertEquals(defaultTemplate.getLocation().getId(), "go2cloud-jhb1");
assertEquals(getCores(defaultTemplate.getHardware()), 1.0d);
}