mirror of https://github.com/apache/jclouds.git
updated test in step with vmware tools
This commit is contained in:
parent
d94ca19941
commit
fff4ca4896
|
@ -73,11 +73,9 @@ public class VCloudGuestCustomizationLiveTest {
|
|||
|
||||
protected void setupCredentials() {
|
||||
identity = checkNotNull(System.getProperty("test." + provider + ".identity"), "test." + provider + ".identity");
|
||||
credential = checkNotNull(System.getProperty("test." + provider + ".credential"), "test." + provider
|
||||
+ ".credential");
|
||||
endpoint = checkNotNull(System.getProperty("test." + provider + ".endpoint"), "test." + provider + ".endpoint");
|
||||
apiversion = checkNotNull(System.getProperty("test." + provider + ".apiversion"), "test." + provider
|
||||
+ ".apiversion");
|
||||
credential = System.getProperty("test." + provider + ".credential");
|
||||
endpoint = System.getProperty("test." + provider + ".endpoint");
|
||||
apiversion = System.getProperty("test." + provider + ".apiversion");
|
||||
}
|
||||
|
||||
protected Properties setupProperties() {
|
||||
|
@ -85,9 +83,12 @@ public class VCloudGuestCustomizationLiveTest {
|
|||
overrides.setProperty(Constants.PROPERTY_TRUST_ALL_CERTS, "true");
|
||||
overrides.setProperty(Constants.PROPERTY_RELAX_HOSTNAME, "true");
|
||||
overrides.setProperty(provider + ".identity", identity);
|
||||
overrides.setProperty(provider + ".credential", credential);
|
||||
overrides.setProperty(provider + ".endpoint", endpoint);
|
||||
overrides.setProperty(provider + ".apiversion", apiversion);
|
||||
if (credential != null)
|
||||
overrides.setProperty(provider + ".credential", credential);
|
||||
if (endpoint != null)
|
||||
overrides.setProperty(provider + ".endpoint", endpoint);
|
||||
if (apiversion != null)
|
||||
overrides.setProperty(provider + ".apiversion", apiversion);
|
||||
return overrides;
|
||||
}
|
||||
|
||||
|
@ -97,7 +98,7 @@ public class VCloudGuestCustomizationLiveTest {
|
|||
Properties overrides = setupProperties();
|
||||
|
||||
client = new ComputeServiceContextFactory().createContext(provider,
|
||||
ImmutableSet.<Module> of(new Log4JLoggingModule()), overrides).getComputeService();
|
||||
ImmutableSet.<Module> of(new Log4JLoggingModule()), overrides).getComputeService();
|
||||
socketTester = new RetryablePredicate<IPSocket>(new InetSocketAddressConnect(), 60, 1, TimeUnit.SECONDS);
|
||||
sshFactory = Guice.createInjector(getSshModule()).getInstance(Factory.class);
|
||||
}
|
||||
|
@ -128,7 +129,7 @@ public class VCloudGuestCustomizationLiveTest {
|
|||
try {
|
||||
ssh.connect();
|
||||
|
||||
assertEquals(ssh.exec(PARSE_VMTOOLSD).getOutput(), script);
|
||||
assertEquals(ssh.exec(PARSE_VMTOOLSD).getOutput(), script.replaceAll("\n", "\r\n"));
|
||||
assertEquals(ssh.exec("cat /root/foo.txt").getOutput().trim(), "I love candy");
|
||||
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue