Issue 29: changed userData to automatically encode data

git-svn-id: http://jclouds.googlecode.com/svn/trunk@2560 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
adrian.f.cole 2009-12-31 18:26:55 +00:00
parent 3f7058454c
commit 9d1ef9bdf5
1 changed files with 4 additions and 4 deletions

View File

@ -129,8 +129,8 @@ public class RunInstancesOptionsTest {
@Test
public void testWithUserData() {
RunInstancesOptions options = new RunInstancesOptions();
options.withUserData("test");
assertEquals(options.buildFormParameters().get("UserData"), Collections.singletonList("test"));
options.withUserData("test".getBytes());
assertEquals(options.buildFormParameters().get("UserData"), Collections.singletonList("dGVzdA=="));
}
@Test
@ -141,8 +141,8 @@ public class RunInstancesOptionsTest {
@Test
public void testWithUserDataStatic() {
RunInstancesOptions options = withUserData("test");
assertEquals(options.buildFormParameters().get("UserData"), Collections.singletonList("test"));
RunInstancesOptions options = withUserData("test".getBytes());
assertEquals(options.buildFormParameters().get("UserData"), Collections.singletonList("dGVzdA=="));
}
@Test(expectedExceptions = NullPointerException.class)