mirror of
https://github.com/apache/jclouds.git
synced 2025-02-19 16:56:14 +00:00
Renamed test methods and file names to match the new api naming convention
This commit is contained in:
parent
7b28bbe61c
commit
694cfdf441
@ -49,7 +49,7 @@ import org.jclouds.chef.strategy.DeleteAllClientsInList;
|
||||
import org.jclouds.chef.strategy.DeleteAllNodesInList;
|
||||
import org.jclouds.chef.strategy.ListClients;
|
||||
import org.jclouds.chef.strategy.ListCookbookVersions;
|
||||
import org.jclouds.chef.strategy.ListEnvironmentNodes;
|
||||
import org.jclouds.chef.strategy.ListNodesInEnvironment;
|
||||
import org.jclouds.chef.strategy.ListEnvironments;
|
||||
import org.jclouds.chef.strategy.ListNodes;
|
||||
import org.jclouds.chef.strategy.UpdateAutomaticAttributesOnNode;
|
||||
@ -89,7 +89,7 @@ public class BaseChefService implements ChefService {
|
||||
private final RunListForGroup runListForGroup;
|
||||
private final ListCookbookVersions listCookbookVersions;
|
||||
private final ListEnvironments listEnvironments;
|
||||
private final ListEnvironmentNodes listEnvironmentNodes;
|
||||
private final ListNodesInEnvironment listNodesInEnvironment;
|
||||
private final Json json;
|
||||
@Resource
|
||||
@Named(ChefProperties.CHEF_LOGGER)
|
||||
@ -104,7 +104,7 @@ public class BaseChefService implements ChefService {
|
||||
UpdateAutomaticAttributesOnNode updateAutomaticAttributesOnNode, Supplier<PrivateKey> privateKey,
|
||||
@Named(CHEF_BOOTSTRAP_DATABAG) String databag, GroupToBootScript groupToBootScript,
|
||||
BootstrapConfigForGroup bootstrapConfigForGroup, RunListForGroup runListForGroup,
|
||||
ListEnvironments listEnvironments, ListEnvironmentNodes listEnvironmentNodes, Json json) {
|
||||
ListEnvironments listEnvironments, ListNodesInEnvironment listNodesInEnvironment, Json json) {
|
||||
this.chefContext = checkNotNull(chefContext, "chefContext");
|
||||
this.api = checkNotNull(api, "api");
|
||||
this.cleanupStaleNodesAndClients = checkNotNull(cleanupStaleNodesAndClients, "cleanupStaleNodesAndClients");
|
||||
@ -123,7 +123,7 @@ public class BaseChefService implements ChefService {
|
||||
this.bootstrapConfigForGroup = checkNotNull(bootstrapConfigForGroup, "bootstrapConfigForGroup");
|
||||
this.runListForGroup = checkNotNull(runListForGroup, "runListForGroup");
|
||||
this.listEnvironments = checkNotNull(listEnvironments, "listEnvironments");
|
||||
this.listEnvironmentNodes = checkNotNull(listEnvironmentNodes, "listEnvironmentNodes");
|
||||
this.listNodesInEnvironment = checkNotNull(listNodesInEnvironment, "listNodesInEnvironment");
|
||||
this.json = checkNotNull(json, "json");
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ public class BaseChefService implements ChefService {
|
||||
|
||||
@Override
|
||||
public Iterable<? extends Node> listNodesInEnvironment(String environmentName) {
|
||||
return listEnvironmentNodes.execute(environmentName);
|
||||
return listNodesInEnvironment.execute(environmentName);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
package org.jclouds.chef.strategy;
|
||||
|
||||
import org.jclouds.chef.domain.Node;
|
||||
import org.jclouds.chef.strategy.internal.ListEnvironmentNodesImpl;
|
||||
import org.jclouds.chef.strategy.internal.ListNodesInEnvironmentImpl;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
@ -28,8 +28,8 @@ import com.google.inject.ImplementedBy;
|
||||
*
|
||||
* @author Noorul Islam K M
|
||||
*/
|
||||
@ImplementedBy(ListEnvironmentNodesImpl.class)
|
||||
public interface ListEnvironmentNodes {
|
||||
@ImplementedBy(ListNodesInEnvironmentImpl.class)
|
||||
public interface ListNodesInEnvironment {
|
||||
|
||||
public Iterable<? extends Node> execute(String environmentName);
|
||||
|
@ -33,7 +33,7 @@ import org.jclouds.Constants;
|
||||
import org.jclouds.chef.ChefApi;
|
||||
import org.jclouds.chef.config.ChefProperties;
|
||||
import org.jclouds.chef.domain.Node;
|
||||
import org.jclouds.chef.strategy.ListEnvironmentNodes;
|
||||
import org.jclouds.chef.strategy.ListNodesInEnvironment;
|
||||
import org.jclouds.logging.Logger;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
@ -49,7 +49,7 @@ import com.google.inject.Inject;
|
||||
* @author Noorul Islam K M
|
||||
*/
|
||||
@Singleton
|
||||
public class ListEnvironmentNodesImpl implements ListEnvironmentNodes {
|
||||
public class ListNodesInEnvironmentImpl implements ListNodesInEnvironment {
|
||||
|
||||
protected final ChefApi api;
|
||||
protected final ListeningExecutorService userExecutor;
|
||||
@ -58,7 +58,7 @@ public class ListEnvironmentNodesImpl implements ListEnvironmentNodes {
|
||||
protected Logger logger = Logger.NULL;
|
||||
|
||||
@Inject
|
||||
ListEnvironmentNodesImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
|
||||
ListNodesInEnvironmentImpl(@Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService userExecutor, ChefApi api) {
|
||||
this.userExecutor = checkNotNull(userExecutor, "userExecuor");
|
||||
this.api = checkNotNull(api, "api");
|
||||
}
|
@ -29,12 +29,12 @@ import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
/**
|
||||
* Tests behavior of {@code GetNodesImpl} strategies
|
||||
* Tests behavior of {@code ListNodesImpl} strategies
|
||||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
@Test(groups = "live", testName = "GetNodesImplLiveTest")
|
||||
public class GetNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
|
||||
@Test(groups = "live", testName = "ListNodesImplLiveTest")
|
||||
public class ListNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
|
||||
|
||||
private ListNodesImpl strategy;
|
||||
private CreateNodeAndPopulateAutomaticAttributesImpl creator;
|
@ -29,21 +29,21 @@ import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
/**
|
||||
* Tests behavior of {@code GetEnvironmentNodesImpl} strategies
|
||||
* Tests behavior of {@code ListNodesInEnvironmentImpl} strategies
|
||||
*
|
||||
* @author Noorul Islam K M
|
||||
*/
|
||||
@Test(groups = "live", testName = "GetEnvironmentNodesImplLiveTest")
|
||||
public class GetEnvironmentNodesImplLiveTest extends BaseChefLiveTest<ChefApi> {
|
||||
@Test(groups = "live", testName = "ListNodesInEnvironmentImplLiveTest")
|
||||
public class ListNodesInEnvironmentImplLiveTest extends BaseChefLiveTest<ChefApi> {
|
||||
|
||||
private ListEnvironmentNodesImpl strategy;
|
||||
private ListNodesInEnvironmentImpl strategy;
|
||||
private CreateNodeAndPopulateAutomaticAttributesImpl creator;
|
||||
|
||||
@Override
|
||||
protected void initialize() {
|
||||
super.initialize();
|
||||
this.creator = injector.getInstance(CreateNodeAndPopulateAutomaticAttributesImpl.class);
|
||||
this.strategy = injector.getInstance(ListEnvironmentNodesImpl.class);
|
||||
this.strategy = injector.getInstance(ListNodesInEnvironmentImpl.class);
|
||||
creator.execute(prefix, ImmutableSet.<String> of());
|
||||
creator.execute(prefix + 1, ImmutableSet.<String> of());
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user