Skip to content

Commit

Permalink
Add service tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Mar 25, 2011
1 parent 9c8441c commit 4344748
Show file tree
Hide file tree
Showing 15 changed files with 1,809 additions and 339 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public CommandInterpreterService(final Framework framework) {
public void resetDefaultProviders(){
registry.put(ExecCommandInterpreter.SERVICE_IMPLEMENTATION_NAME, ExecCommandInterpreter.class);
registry.put(ScriptFileCommandInterpreter.SERVICE_IMPLEMENTATION_NAME, ScriptFileCommandInterpreter.class);
instanceregistry.remove(ExecCommandInterpreter.SERVICE_IMPLEMENTATION_NAME);
instanceregistry.remove(ScriptFileCommandInterpreter.SERVICE_IMPLEMENTATION_NAME);
}

public CommandInterpreter getInterpreterForExecutionItem(final ExecutionItem item) throws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ public InterpreterResult interpretCommand(ExecutionContext context, ExecutionIte


try {
///TODO: set executable bit if necessary???

/**
* TODO: Avoid this horrific hack. Discover how to get SCP task to preserve the execute bit.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected File writeScriptTempFile(ExecutionContext context, final File original
return tempfile;
}

protected String appendRemoteFileExtensionForNode(INodeEntry node, String remoteFilename) {
public String appendRemoteFileExtensionForNode(INodeEntry node, String remoteFilename) {
if ("windows".equalsIgnoreCase(node.getOsFamily().trim())) {
remoteFilename += (remoteFilename.endsWith(".bat") ? "" : ".bat");
} else {
Expand All @@ -95,7 +95,7 @@ protected String appendRemoteFileExtensionForNode(INodeEntry node, String remote
return remoteFilename;
}

protected String getRemoteDirForNode(INodeEntry node) {
public String getRemoteDirForNode(INodeEntry node) {
//TODO: allow set temp dir via node attribute
String remotedir = "/tmp/";
if ("windows".equalsIgnoreCase(node.getOsFamily().trim())) {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
public class FileCopierService extends NodeSpecifiedService<FileCopier> {
private static final String SERVICE_NAME = "FileCopier";
private static final String SERVICE_FILECOPIER_DEFAULT_TYPE = "service.filecopier.default.type";
private static final String REMOTE_NODE_SERVICE_SPECIFIER_ATTRIBUTE = "remote-file-copy-service";
private static final String LOCAL_NODE_SERVICE_SPECIFIER_ATTRIBUTE = "local-file-copy-service";
public static final String REMOTE_NODE_SERVICE_SPECIFIER_ATTRIBUTE = "remote-file-copy-service";
public static final String LOCAL_NODE_SERVICE_SPECIFIER_ATTRIBUTE = "local-file-copy-service";

public String getName() {
return SERVICE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
public class NodeExecutorService extends NodeSpecifiedService<NodeExecutor> {
private static final String SERVICE_NAME = "NodeExecutor";
private static final String SERVICE_FILECOPIER_DEFAULT_TYPE = "service.nodeexec.default.type";
private static final String NODE_SERVICE_SPECIFIER_ATTRIBUTE = "exec-service";
private static final String LOCAL_NODE_SERVICE_SPECIFIER_ATTRIBUTE = "local-exec-service";
public static final String NODE_SERVICE_SPECIFIER_ATTRIBUTE = "exec-service";
public static final String LOCAL_NODE_SERVICE_SPECIFIER_ATTRIBUTE = "local-exec-service";

public String getName() {
return SERVICE_NAME;
Expand Down

0 comments on commit 4344748

Please sign in to comment.