added admin access property to all unit tests as hudson requires it (no pk)

This commit is contained in:
David Ribeiro Alves 2012-07-18 11:36:57 +01:00
parent 240f76661c
commit 0949d52224
4 changed files with 8 additions and 0 deletions

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.nodepool;
import static org.jclouds.nodepool.config.NodePoolProperties.POOL_ADMIN_ACCESS;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertSame;
@ -81,6 +82,7 @@ public class NodeMetadataStoreTest {
overrides.setProperty(NodePoolProperties.BACKEND_PROVIDER, "stub");
overrides.setProperty(NodePoolProperties.MIN_SIZE, "0");
overrides.setProperty(NodePoolProperties.BASEDIR, baseDir);
overrides.setProperty(POOL_ADMIN_ACCESS, "adminUsername=pooluser,adminPassword=poolpass");
// note no ssh module since we are stub and not trying ssh, yet
overrides.setProperty(NodePoolProperties.BACKEND_MODULES, SLF4JLoggingModule.class.getName());
Context nodePoolCtx = ContextBuilder.newBuilder("nodepool").credentials("foo", "bar").overrides(overrides)

View File

@ -18,6 +18,7 @@
*/
package org.jclouds.nodepool;
import static org.jclouds.nodepool.config.NodePoolProperties.POOL_ADMIN_ACCESS;
import static org.testng.Assert.assertEquals;
import java.io.File;
@ -50,6 +51,7 @@ public class NodePoolComputeServiceContextTest {
overrides.setProperty(NodePoolProperties.BASEDIR, basedir);
// note no ssh module since we are stub and not trying ssh, yet
overrides.setProperty(NodePoolProperties.BACKEND_MODULES, SLF4JLoggingModule.class.getName());
overrides.setProperty(POOL_ADMIN_ACCESS, "adminUsername=pooluser,adminPassword=poolpass");
ComputeService stub = ContextBuilder.newBuilder("nodepool").credentials("foo", "bar").endpoint("gooend")
.apiVersion("1.1").buildVersion("1.1-2").overrides(overrides).buildInjector()

View File

@ -19,6 +19,7 @@
package org.jclouds.nodepool.config;
import static org.easymock.EasyMock.createNiceMock;
import static org.jclouds.nodepool.config.NodePoolProperties.POOL_ADMIN_ACCESS;
import static org.testng.Assert.assertEquals;
import java.io.File;
@ -57,6 +58,7 @@ public class BindBackendComputeServiceTest {
// note no ssh module since we are stub and not trying ssh, yet
overrides.setProperty(NodePoolProperties.BACKEND_MODULES, SLF4JLoggingModule.class.getName() + ","
+ StubSshClientModule.class.getName());
overrides.setProperty(POOL_ADMIN_ACCESS, "adminUsername=pooluser,adminPassword=poolpass");
ComputeService stub = ContextBuilder.newBuilder("nodepool").credentials("foo", "bar").endpoint("gooend")
.apiVersion("1.1").buildVersion("1.1-2").overrides(overrides).buildInjector()

View File

@ -50,6 +50,8 @@ public class BindInputStreamToFilesystemBlobStoreTest {
protected void configure() {
bindConstant().annotatedWith(Names.named(NodePoolProperties.BASEDIR)).to(basedir);
bindConstant().annotatedWith(Names.named(NodePoolProperties.METADATA_CONTAINER)).to("barr");
bindConstant().annotatedWith(Names.named(NodePoolProperties.POOL_ADMIN_ACCESS)).to(
"adminUsername=pooluser,adminPassword=poolpass");
bindConstant().annotatedWith(Names.named(NodePoolProperties.BACKEND_MODULES)).to(
SLF4JLoggingModule.class.getName());
}