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