diff --git a/compute/src/test/java/org/jclouds/compute/ComputeTestUtils.java b/compute/src/test/java/org/jclouds/compute/ComputeTestUtils.java index d55634076b..4a341403a8 100644 --- a/compute/src/test/java/org/jclouds/compute/ComputeTestUtils.java +++ b/compute/src/test/java/org/jclouds/compute/ComputeTestUtils.java @@ -91,4 +91,5 @@ public class ComputeTestUtils { } } } + } diff --git a/compute/src/test/java/org/jclouds/compute/RunScriptData.java b/compute/src/test/java/org/jclouds/compute/RunScriptData.java index 15866678f5..15f9041e7c 100644 --- a/compute/src/test/java/org/jclouds/compute/RunScriptData.java +++ b/compute/src/test/java/org/jclouds/compute/RunScriptData.java @@ -43,7 +43,7 @@ public class RunScriptData { private static String jbossHome = "/usr/local/jboss"; - public static String createScriptInstallBase(OperatingSystem os) { + public static String installJavaAndCurl(OperatingSystem os) { if (os == null || OperatingSystemPredicates.supportsApt().apply(os)) return APT_RUN_SCRIPT; else if (OperatingSystemPredicates.supportsYum().apply(os)) @@ -63,7 +63,7 @@ public class RunScriptData { envVariables, ImmutableList. of( new AuthorizeRSAPublicKey(publicKey), - exec(createScriptInstallBase(os)), + exec(installJavaAndCurl(os)), exec("rm -rf /var/cache/apt /usr/lib/vmware-tools"),// jeos hasn't enough room! extractTargzIntoDirectory( URI.create("http://commondatastorage.googleapis.com/jclouds-repo/jboss-as-distribution-6.0.0.20100911-M5.tar.gz"), @@ -92,7 +92,6 @@ public class RunScriptData { .append( "echo \"baseurl=http://ec2-us-east-mirror.rightscale.com/epel/5/i386/\" >> /etc/yum.repos.d/CentOS-Base.repo\n")// .append("echo \"enabled=1\" >> /etc/yum.repos.d/CentOS-Base.repo\n")// - // .append("which unzip ||yum --nogpgcheck -y install unzip\n")// .append("which curl ||yum --nogpgcheck -y install curl\n")// .append( "(which java && java -fullversion 2>&1|egrep -q 1.6 ) || yum --nogpgcheck -y install java-1.6.0-openjdk&&")// @@ -101,7 +100,6 @@ public class RunScriptData { public static final String ZYPPER_RUN_SCRIPT = new StringBuilder()// .append("echo nameserver 208.67.222.222 >> /etc/resolv.conf\n")// - // .append("which unzip ||sudo zypper install unzip\n")// .append("which curl || zypper install curl\n")// .append("(which java && java -fullversion 2>&1|egrep -q 1.6 ) || zypper install java-1.6.0-openjdk\n")// .toString(); diff --git a/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java b/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java index 5022a0c175..a8229aa267 100644 --- a/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java +++ b/core/src/main/java/org/jclouds/http/filters/BasicAuthentication.java @@ -52,11 +52,11 @@ public class BasicAuthentication implements HttpRequestFilter { private final Set credentialList; @Inject - BasicAuthentication(@Named(PROPERTY_IDENTITY) String user, @Named(PROPERTY_CREDENTIAL) String password, Crypto crypto) - throws UnsupportedEncodingException { + public BasicAuthentication(@Named(PROPERTY_IDENTITY) String user, @Named(PROPERTY_CREDENTIAL) String password, + Crypto crypto) throws UnsupportedEncodingException { this.credentialList = ImmutableSet.of("Basic " - + CryptoStreams.base64(String.format("%s:%s", checkNotNull(user, "user"), - checkNotNull(password, "password")).getBytes("UTF-8"))); + + CryptoStreams.base64(String.format("%s:%s", checkNotNull(user, "user"), + checkNotNull(password, "password")).getBytes("UTF-8"))); } public void filter(HttpRequest request) throws HttpException {