From 9d1ef9bdf52beb4021354310771fe6a429fcad69 Mon Sep 17 00:00:00 2001 From: "adrian.f.cole" Date: Thu, 31 Dec 2009 18:26:55 +0000 Subject: [PATCH] Issue 29: changed userData to automatically encode data git-svn-id: http://jclouds.googlecode.com/svn/trunk@2560 3d8758e0-26b5-11de-8745-db77d3ebf521 --- .../jclouds/aws/ec2/options/RunInstancesOptionsTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RunInstancesOptionsTest.java b/aws/core/src/test/java/org/jclouds/aws/ec2/options/RunInstancesOptionsTest.java index 803b5c9dc0..0da9638e42 100644 --- a/aws/core/src/test/java/org/jclouds/aws/ec2/options/RunInstancesOptionsTest.java +++ b/aws/core/src/test/java/org/jclouds/aws/ec2/options/RunInstancesOptionsTest.java @@ -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)