mirror of https://github.com/apache/jclouds.git
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:
parent
3f7058454c
commit
9d1ef9bdf5
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue