mirror of https://github.com/apache/jclouds.git
Merge pull request #727 from jclouds/fix-issues-building-on-win
Fix issues building on Windows
This commit is contained in:
commit
4ac8770e66
|
@ -64,6 +64,8 @@ import com.google.inject.util.Providers;
|
|||
*/
|
||||
@Test(groups = "unit", testName = "CreateUniqueKeyTest")
|
||||
public class CreateUniqueKeyTest {
|
||||
private static final String lineSeparator = System.getProperty("line.separator");
|
||||
|
||||
private Factory namingConvention;
|
||||
private KeyPair keyPair;
|
||||
private String openSshKey;
|
||||
|
@ -111,7 +113,7 @@ public class CreateUniqueKeyTest {
|
|||
CreateUniqueKey parser = new CreateUniqueKey(cloudApiApi, namingConvention, crypto, Providers.of(secureRandom));
|
||||
|
||||
assertEquals(parser.load(DatacenterAndName.fromDatacenterAndName("datacenter", "group")),
|
||||
KeyAndPrivateKey.fromKeyAndPrivateKey(key, PRIVATE_KEY));
|
||||
KeyAndPrivateKey.fromKeyAndPrivateKey(key, PRIVATE_KEY.replaceAll("\n", lineSeparator)));
|
||||
|
||||
verify(cloudApiApi, keyApi, crypto, rsaKeyPairGenerator, secureRandom);
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.jclouds.virtualbox;
|
|||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
@ -44,9 +45,9 @@ import com.google.common.collect.Iterables;
|
|||
* @author dralves
|
||||
*
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "StartJettyIfNotAlreadyRunningLiveTest")
|
||||
@Test(groups = "live", singleThreaded = true, testName = "PreseedCfgServerTest")
|
||||
public class PreseedCfgServerTest {
|
||||
|
||||
private static final String lineSeparator = System.getProperty("line.separator");
|
||||
@Test
|
||||
public void testJettyServerServesPreseedFile() throws Exception {
|
||||
Properties props = VirtualBoxApiMetadata.defaultProperties();
|
||||
|
@ -60,7 +61,7 @@ public class PreseedCfgServerTest {
|
|||
starter.start(preconfigurationUrl, getDefaultImage().preseed_cfg);
|
||||
|
||||
String preseedFileFromJetty = IOUtils.toString(new URL("http://127.0.0.1:" + port + "/preseed.cfg").openStream());
|
||||
String preseedFileFromFile = getDefaultImage().preseed_cfg + "\n";
|
||||
String preseedFileFromFile = getDefaultImage().preseed_cfg + lineSeparator;
|
||||
assertEquals(preseedFileFromFile, preseedFileFromJetty);
|
||||
|
||||
starter.stop();
|
||||
|
|
|
@ -604,7 +604,7 @@
|
|||
<configuration>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<quiet>true</quiet>
|
||||
<additionalJOption>-J-Xmx256m</additionalJOption>
|
||||
<maxmemory>256m</maxmemory>
|
||||
</configuration>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
|
@ -708,7 +708,7 @@
|
|||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.8.1</version>
|
||||
<configuration>
|
||||
<additionalJOption>-J-Xmx256m</additionalJOption>
|
||||
<maxmemory>256m</maxmemory>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
<quiet>true</quiet>
|
||||
<links>
|
||||
|
|
|
@ -19,11 +19,13 @@
|
|||
|
||||
package org.jclouds.scriptbuilder.statements.login;
|
||||
|
||||
import static java.lang.String.format;
|
||||
import static org.jclouds.scriptbuilder.statements.login.AdminAccessBuilderSpec.parse;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertNull;
|
||||
import static org.testng.Assert.fail;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import javax.inject.Provider;
|
||||
|
@ -104,7 +106,7 @@ public class AdminAccessBuilderSpecTest {
|
|||
|
||||
public void testParsePrivateKeyFile() {
|
||||
AdminAccessBuilderSpec spec = parse("adminPrivateKeyFile=target/test-classes/test");
|
||||
assertEquals(spec.getAdminPrivateKeyFile().getPath(), "target/test-classes/test");
|
||||
assertEquals(spec.getAdminPrivateKeyFile().getPath(), format("target%stest-classes%stest", File.separator, File.separator));
|
||||
assertNull(spec.adminHome);
|
||||
assertNull(spec.adminPassword);
|
||||
assertNull(spec.adminPublicKeyFile);
|
||||
|
|
Loading…
Reference in New Issue