From 75ce908c130ebc73f6d505315200398e3cfd135e Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Mon, 16 Jul 2012 15:24:26 -0400 Subject: [PATCH] Made joyent-api tests compatible with Windows --- .../cloudapi/v6_5/compute/loaders/CreateUniqueKeyTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/labs/joyent-cloudapi/src/test/java/org/jclouds/joyent/cloudapi/v6_5/compute/loaders/CreateUniqueKeyTest.java b/labs/joyent-cloudapi/src/test/java/org/jclouds/joyent/cloudapi/v6_5/compute/loaders/CreateUniqueKeyTest.java index c264bcdca4..1eb3aa40b6 100644 --- a/labs/joyent-cloudapi/src/test/java/org/jclouds/joyent/cloudapi/v6_5/compute/loaders/CreateUniqueKeyTest.java +++ b/labs/joyent-cloudapi/src/test/java/org/jclouds/joyent/cloudapi/v6_5/compute/loaders/CreateUniqueKeyTest.java @@ -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); }