prevented tests from failing due to missing property

!
This commit is contained in:
David Ribeiro Alves 2012-03-18 20:18:01 +00:00
parent 0f15559f2c
commit f4d0e18320
3 changed files with 9 additions and 13 deletions

View File

@ -19,7 +19,7 @@
package org.jclouds.virtualbox;
import static org.jclouds.Constants.PROPERTY_API_VERSION;
import static org.jclouds.Constants.*;
import static org.jclouds.Constants.PROPERTY_BUILD_VERSION;
import static org.jclouds.Constants.PROPERTY_ENDPOINT;
import static org.jclouds.compute.reference.ComputeServiceConstants.PROPERTY_IMAGE_AUTHENTICATE_SUDO;

View File

@ -119,10 +119,8 @@ public class BaseVirtualBoxClientLiveTest extends BaseVersionedServiceLiveTest {
}
protected void ensureIdentityPropertyIsSpecifiedOrTakeFromDefaults() {
Properties defaultVBoxProperties = new VirtualBoxPropertiesBuilder().build();
if (!System.getProperties().containsKey("test." + provider + ".identity"))
System.setProperty("test." + provider + ".identity",
defaultVBoxProperties.getProperty(Constants.PROPERTY_IDENTITY));
System.setProperty("test." + provider + ".identity", "administrator");
}
@BeforeClass(groups = "live")
@ -149,14 +147,11 @@ public class BaseVirtualBoxClientLiveTest extends BaseVersionedServiceLiveTest {
checkNotNull(mastersCache.apply(template.getImage()));
}
protected void undoVm(VmSpec vmSpecification) {
machineUtils.unlockMachineAndApplyOrReturnNullIfNotRegistered(vmSpecification.getVmId(),
new UnregisterMachineIfExistsAndDeleteItsMedia(vmSpecification));
}
public String adminDisk(String vmName) {
return workingDir + File.separator + vmName + ".vdi";
}

View File

@ -133,6 +133,7 @@ public class CreateAndInstallVmLiveTest extends BaseVirtualBoxClientLiveTest {
machineUtils.applyForMachine(machine.getName(), new LaunchMachineIfNotAlreadyRunning(manager.get(),
ExecutionType.GUI, ""));
sshClientForIMachine = injector.getInstance(IMachineToSshClient.class);
SshClient client = sshClientForIMachine.apply(machine);