Unverified Commit 02d4b145 authored by Jay Jay Billings's avatar Jay Jay Billings Committed by GitHub
Browse files

Merge pull request #447 from osbornjd/jay/MarkIII_428

Test Config Directory Update #428
parents 6a3b2fa8 7a574f32
......@@ -20,11 +20,16 @@ $ mvn clean verify
In both cases one can skip the tests by including `-DskipTests` in your build.
#### Dependencies
All dependencies are noted in the `pom` file, and are within Maven central. Thus, there should be no external dependencies that are necessary when running the Commands API.
### Dependencies
All dependencies are noted in the `pom` file, and all but one are within maven central. The only non-centralized dependency is the ICE package `org.eclipse.ice.tests.data`. To install it, perform the following commands (after cloning the ICE repositiory) so that the Commands package can build successfully:
#### Note about tests
The automated testing is performed with a dummy remote host, which has private credentials. Thus, if the tests are built with the package, a significant portion of the tests will fail due to the fact that the dummy remote host credentials are not distributed publicly. To solve this, one may enter any generic remote host credentials into the file `/tmp/ice-remote-creds.txt` in the following order
```shell
$ cd org.eclipse.ice.tests
$ mvn clean install
```
### Notes about tests
The automated testing is performed with a dummy remote host, which has private credentials. Thus, if the tests are built with the package, a significant portion of the tests will fail due to the fact that the dummy remote host credentials are not distributed publicly. To solve this, one may enter any generic remote host credentials into the file `$TEST_DATA_PATH/commands/ice-remote-creds.txt` in the following order
```
username
......@@ -32,7 +37,7 @@ password
hostname
```
Windows users need to put their ssh credentials into the file located at `C:\Users\Adminstrator\ice-remote-creds.txt` in order for the tests to properly function.
See the README in `org.eclipse.ice.tests/org.eclipse.ice.tests.data` for information regarding the `$TEST_DATA_PATH` environment variable; [this link](https://github.com/dbluhm/ice/blob/next/org.eclipse.ice.tests/org.eclipse.ice.tests.data/README.md) takes you to the README on the `next` branch.
The automated tests will then grab the necessary credentials from this file to run. Any valid ssh connection will work. If you still find that the tests fail, ensure that the ssh connection you are using has been logged into before from your host computer such that there is a key fingerprint associated to that host in your `~/.ssh/known_hosts` file. The Commands package requires that this key exists in order for authentication to proceed, no matter what form of authentication you use. In the event that tests fail on a host that already exists in `known_hosts` (e.g. with the error message `server key did not validate`, try deleting your `known_hosts` file (or the entries in your `known_hosts` that correspond to the host you are trying to run the tests on), logging in again to re-establish a fingerprint, and running the tests again.
......@@ -46,7 +51,7 @@ ConnectionManagerFactory.getConnectionManager().setRequireStrictHostKeyChecking(
Note that this is also a way through which ssh validation can be performed in the package for running actual remote commands/file transfers.
#### EmailHandler test
To test the `EmailUpdateHandler` class, a similar file to the `/tmp/ice-remote-creds.txt` file must be created. Instead, a file in the location `/tmp/ice-email-creds.txt` must exist which contains the following information:
To test the `EmailUpdateHandler` class, a similar file to the ssh credential file must be created. Instead, a file in the location `$TEST_DATA_PATH/commands/ice-email-creds.txt` must exist which contains the following information:
```
email@address
......@@ -70,9 +75,10 @@ Then you should be able to remotely login via `ssh -i /path/to/key username@host
For the keygen connection tests to pass, you should also create a key to a remote host that the tests expect to find. This can be done with any arbitrary remote server that you have credential access to; however, the key must be named dummyhostkey and must exist in your home `.ssh` directory. In other words, the key must be here:
```
~/.ssh/dummyhostkey
$HOME/.ssh/dummyhostkey
```
where `$HOME` is the result returned from `System.getProperty("user.home")`.
......
......@@ -17,8 +17,13 @@
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.12</version>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.eclipse.ice</groupId>
<artifactId>org.eclipse.ice.tests.data</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
......
......@@ -40,6 +40,9 @@ public class EmailUpdateHandler implements ICommandUpdateHandler {
// Text file credential handler for sender's email creds
TxtFileConnectionAuthorizationHandler credHandler;
/// Mail port to email over, depends on client
private String mailPort = "25";
/**
* Default constructor
......@@ -55,7 +58,7 @@ public class EmailUpdateHandler implements ICommandUpdateHandler {
// Create some properties and setup the default
// server properties
Properties properties = System.getProperties();
properties.put("mail.smtp.port", "25");
properties.put("mail.smtp.port", mailPort);
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable", "true"); // TLS
// Setup mail server
......@@ -69,6 +72,7 @@ public class EmailUpdateHandler implements ICommandUpdateHandler {
String.valueOf(credHandler.getPassword()));
}
});
// Set session to debug just to be explicit
session.setDebug(true);
......@@ -120,5 +124,13 @@ public class EmailUpdateHandler implements ICommandUpdateHandler {
public void setMessage(String message) {
this.emailText = message;
}
/**
* Setter for mail port that depends on email client used
* @param mailPort
*/
public void setMailPort(String mailPort) {
this.mailPort = mailPort;
}
}
......@@ -63,6 +63,7 @@ public class TxtFileConnectionAuthorizationHandler extends ConnectionAuthorizati
try (Scanner scanner = new Scanner(credFile)) {
// Skip the username since it has already been set
username = scanner.next();
// Get the password
char[] pwd = scanner.next().toCharArray();
return pwd;
......
......@@ -12,7 +12,6 @@
package org.eclipse.ice.tests.commands;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
......@@ -37,6 +36,7 @@ import org.eclipse.ice.commands.LocalFileHandler;
import org.eclipse.ice.commands.RemoteCommand;
import org.eclipse.ice.commands.RemoteFileHandler;
import org.eclipse.ice.commands.TxtFileConnectionAuthorizationHandler;
import org.eclipse.ice.tests.data.TestDataPath;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
......@@ -55,28 +55,28 @@ public class CommandFactoryTest {
* The hostname for which the job should run on. Default to local host name for
* now
*/
String hostname = getLocalHostname();
private String hostname = getLocalHostname();
/**
* Create a command factory to use for getting the commands.
*/
CommandFactory factory = new CommandFactory();
/**
* A string containing the working directory for the executable to run in
*/
String workingDirectory;
private CommandFactory factory = new CommandFactory();
/**
* Get the present working directory to run things in
*/
String pwd = System.getProperty("user.dir") + "/src/test/java/org/eclipse/ice/tests/commands/";
private String pwd = System.getProperty("user.dir") + "/src/test/java/org/eclipse/ice/tests/commands/";
/**
* A connection configuration with which to test
*/
ConnectionConfiguration connectionConfig = new ConnectionConfiguration();
private ConnectionConfiguration connectionConfig = new ConnectionConfiguration();
/**
* A TDP for collecting configuration files to run tests
*/
private TestDataPath dataPath = new TestDataPath();
/**
* Default constructor
*/
......@@ -179,13 +179,16 @@ public class CommandFactoryTest {
// This is the connection where the job will be executed
// Get a factory which determines the type of authorization
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
// credentials
String keyPath = System.getProperty("user.home") + "/.ssh/somekey";
String keyPath = dataPath.resolve("commands/somekey").toString();
ConnectionAuthorizationHandler auth = authFactory.getConnectionAuthorizationHandler("keypath",
keyPath);
auth.setHostname("hostname");
auth.setUsername("password");
// Set it
ConnectionConfiguration firstConn = new ConnectionConfiguration();
firstConn.setAuthorization(auth);
......@@ -196,10 +199,9 @@ public class CommandFactoryTest {
firstConn.deleteWorkingDirectory(false);
ConnectionConfiguration secondConn = new ConnectionConfiguration();
String credFile = "/tmp/ice-remote-creds.txt";
if(System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandler intermAuth = authFactory.getConnectionAuthorizationHandler("text",credFile);
secondConn.setAuthorization(intermAuth);
secondConn.setName("executeConnection");
......@@ -689,12 +691,12 @@ public class CommandFactoryTest {
ConnectionConfiguration cfg = new ConnectionConfiguration();
// Make the connection configuration
// Get a factory which determines the type of authorization
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
// credentials
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandler auth = authFactory.getConnectionAuthorizationHandler("text", credFile);
// Set it
cfg.setAuthorization(auth);
......
......@@ -25,6 +25,7 @@ import org.eclipse.ice.commands.EmailUpdateHandler;
import org.eclipse.ice.commands.HTTPCommandUpdateHandler;
import org.eclipse.ice.commands.ICommandUpdateHandler;
import org.eclipse.ice.commands.TxtFileConnectionAuthorizationHandler;
import org.eclipse.ice.tests.data.TestDataPath;
import org.junit.Test;
/**
......@@ -37,6 +38,11 @@ import org.junit.Test;
*/
public class CommandFactoryUpdaterTest {
/**
* A TDP for collecting config files
*/
private TestDataPath dataPath = new TestDataPath();
/**
* This function tests a command with an HTTPUpdater
*/
......@@ -147,15 +153,14 @@ public class CommandFactoryUpdaterTest {
*/
private EmailUpdateHandler setupEmailUpdateHandler() {
// Get a text file with credentials
String credFile = "/tmp/email-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\email-creds.txt";
String credFile = dataPath.resolve("commands/ice-email-creds.txt").toString();
TxtFileConnectionAuthorizationHandler auth = new TxtFileConnectionAuthorizationHandler();
auth.setOption(credFile);
EmailUpdateHandler handler = new EmailUpdateHandler();
handler.setCredHandler(auth);
handler.setMailPort("587");
return handler;
}
}
......@@ -30,6 +30,7 @@ import org.eclipse.ice.commands.ConnectionManagerFactory;
import org.eclipse.ice.commands.LocalCommand;
import org.eclipse.ice.commands.RemoteCommand;
import org.eclipse.ice.commands.TxtFileConnectionAuthorizationHandler;
import org.eclipse.ice.tests.data.TestDataPath;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
......@@ -46,8 +47,13 @@ public class CommandTest {
* Get the present working directory Add the following directories where the
* tests live
*/
String pwd = System.getProperty("user.dir") + "/src/test/java/org/eclipse/ice/tests/commands/";
private String pwd = System.getProperty("user.dir") + "/src/test/java/org/eclipse/ice/tests/commands/";
/**
* A TDP for collecting config files
*/
private TestDataPath dataPath = new TestDataPath();
/**
* Remove output files after tests finish running
*
......@@ -118,21 +124,24 @@ public class CommandTest {
commandConfig.setAppendInput(true); // append the input file name to the script executable command
commandConfig.setNumProcs("1"); // number of processes is 1
commandConfig.setOS(System.getProperty("os.name"));
// Set the remote working directory, where the command will be processed
commandConfig.setRemoteWorkingDirectory("/tmp/remoteCommandTestDirectory");
// Set the connection configuration to a dummy remote connection
// Make the ConnectionConfiguration and set it up
ConnectionConfiguration connectConfig = new ConnectionConfiguration();
// Make the connection configuration
// Get a factory which determines the type of authorization
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
// credentials
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandler auth = authFactory.getConnectionAuthorizationHandler("text", credFile);
// Set it
connectConfig.setAuthorization(auth);
connectConfig.setName("dummyConnection");
......@@ -160,18 +169,21 @@ public class CommandTest {
public void testLocalCommand() {
System.out.println("\n\n\n\nTest a local command!");
String os = System.getProperty("os.name");
// Set the CommandConfiguration class
// See {@link org.eclipse.ice.commands.CommandConfiguration} for detailed info
// on each
CommandConfiguration commandConfig = new CommandConfiguration();
commandConfig.setCommandId(1);
commandConfig.setExecutable("./test_code_execution.sh");
// If the os is windows, set the executable appropriately
if (os.toLowerCase().contains("win")) {
// two slashes so that java doesn't read it as a tab
commandConfig.setExecutable(".\\test_code_execution.ps1");
commandConfig.setInterpreter("powershell.exe");
}
commandConfig.addInputFile("someInputFile", "someInputFile.txt");
commandConfig.setErrFileName("someLocalErrFile.txt");
commandConfig.setOutFileName("someLocalOutFile.txt");
......@@ -226,14 +238,15 @@ public class CommandTest {
// Make the ConnectionConfiguration and set it up
ConnectionConfiguration connectConfig = new ConnectionConfiguration();
// Make the connection configuration
// Get a factory which determines the type of authorization
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
// credentials
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandler auth = authFactory.getConnectionAuthorizationHandler("text", credFile);
// Set it
connectConfig.setAuthorization(auth);
......@@ -292,14 +305,15 @@ public class CommandTest {
public void testArgumentCommand() {
// Make the ConnectionConfiguration and set it up
ConnectionConfiguration connectConfig = new ConnectionConfiguration();
// Make the connection configuration
// Get a factory which determines the type of authorization
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
// credentials
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandler auth = authFactory.getConnectionAuthorizationHandler("text", credFile);
// Set it
connectConfig.setAuthorization(auth);
......
......@@ -25,6 +25,7 @@ import org.eclipse.ice.commands.ConnectionAuthorizationHandler;
import org.eclipse.ice.commands.ConnectionAuthorizationHandlerFactory;
import org.eclipse.ice.commands.ConnectionConfiguration;
import org.eclipse.ice.commands.ConnectionManagerFactory;
import org.eclipse.ice.tests.data.TestDataPath;
import org.junit.Test;
/**
......@@ -36,8 +37,16 @@ import org.junit.Test;
*/
public class ConnectionAuthorizationHandlerFactoryTest {
/**
* A factory for generating the authorizations
*/
private ConnectionAuthorizationHandlerFactory factory = new ConnectionAuthorizationHandlerFactory();
/**
* A TDP for collecting config files
*/
private TestDataPath dataPath = new TestDataPath();
/**
* Tests local authorization of
* {@link org.eclipse.ice.commands.ConnectionAuthorizationHandlerFactory#getConnectionAuthorizationHandler(String)}
......@@ -67,9 +76,8 @@ public class ConnectionAuthorizationHandlerFactoryTest {
*/
@Test
public void testTextAuthorization() throws IOException {
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
// Get a text file authorization handler
ConnectionAuthorizationHandler text = factory.getConnectionAuthorizationHandler("text", credFile);
......@@ -114,9 +122,7 @@ public class ConnectionAuthorizationHandlerFactoryTest {
// Create a text file credential path to get the same username/hostname
// as the key, in the event someone is using a host that is not the dummy
// server
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
// Get a text file authorization handler
ConnectionAuthorizationHandler text = factory.getConnectionAuthorizationHandler("text", credFile);
......
......@@ -27,6 +27,7 @@ import org.eclipse.ice.commands.ConnectionConfiguration;
import org.eclipse.ice.commands.ConnectionManager;
import org.eclipse.ice.commands.ConnectionManagerFactory;
import org.eclipse.ice.commands.KeyPathConnectionAuthorizationHandler;
import org.eclipse.ice.tests.data.TestDataPath;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
......@@ -59,6 +60,11 @@ public class ConnectionManagerTest {
*/
static ConnectionConfiguration configuration = new ConnectionConfiguration();
/**
* A TDP for collecting config files
*/
static TestDataPath dataPath = new TestDataPath();
/**
* This function makes a test connection with which to play with
*
......@@ -70,12 +76,11 @@ public class ConnectionManagerTest {
// Set up the configuration with the necessary credentials
// Get a factory which determines the type of authorization
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
// credentials
ConnectionAuthorizationHandler auth = null;
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
auth = authFactory.getConnectionAuthorizationHandler("text", credFile);
......@@ -218,9 +223,7 @@ public class ConnectionManagerTest {
ConnectionManager manager = ConnectionManagerFactory.getConnectionManager();
// Read in a dummy configuration file that contains credentials
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
// Set the credentials since they were deleted after closing the previous
// connection
......@@ -322,9 +325,7 @@ public class ConnectionManagerTest {
ConnectionManager manager = ConnectionManagerFactory.getConnectionManager();
// Read in a dummy configuration file that contains credentials
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
......
......@@ -19,6 +19,7 @@ import java.io.IOException;
import org.eclipse.ice.commands.EmailUpdateHandler;
import org.eclipse.ice.commands.TxtFileConnectionAuthorizationHandler;
import org.eclipse.ice.tests.data.TestDataPath;
import org.junit.Test;
/**
......@@ -39,10 +40,9 @@ public class EmailHandlerTest {
public void testEmailNotificationPostUpdate() {
// Get a text file with credentials
String credFile = "/tmp/email-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\email-creds.txt";
TestDataPath dataPath = new TestDataPath();
String credFile = dataPath.resolve("commands/ice-email-creds.txt").toString();
TxtFileConnectionAuthorizationHandler handler = new TxtFileConnectionAuthorizationHandler();
handler.setOption(credFile);
......@@ -51,6 +51,7 @@ public class EmailHandlerTest {
updater.setCredHandler(handler);
updater.setMessage("This is a test updater");
updater.setSubject("This is a test subject");
updater.setMailPort("587"); // gmail mail port
try {
updater.postUpdate();
} catch (IOException e) {
......@@ -66,6 +67,7 @@ public class EmailHandlerTest {
*/
@Test
public void testEmailNotificationPostUpdateBadCreds() {
// Just make up some dummy file that doesn't actually exist
String credFile = "/tmp/dumFile.txt";
if (System.getProperty("os.name").toLowerCase().contains("win"))
credFile = "C:\\Users\\Administrator\\dumFile.txt";
......
......@@ -25,6 +25,7 @@ import org.eclipse.ice.commands.ConnectionConfiguration;
import org.eclipse.ice.commands.ConnectionManager;
import org.eclipse.ice.commands.ConnectionManagerFactory;
import org.eclipse.ice.commands.RemoteCommand;
import org.eclipse.ice.tests.data.TestDataPath;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
......@@ -49,10 +50,17 @@ public class RemoteCommandTest {
*/
static ConnectionConfiguration connectConfig = new ConnectionConfiguration();
// Get the present working directory and add the extra directories to get the
// directory where the executable lives
/**
* Get the present working directory and add the extra directories to get the
* directory where the executable lives
*/
static String pwd = System.getProperty("user.dir") + "/src/test/java/org/eclipse/ice/tests/commands/";
/**
* A TDP for collecting config files
*/
static TestDataPath dataPath = new TestDataPath();
@After
public void tearDown() throws Exception {
ConnectionManagerFactory.getConnectionManager().listAllConnections();
......@@ -93,12 +101,11 @@ public class RemoteCommandTest {
// Make the connection configuration
// Get a factory which determines the type of authorization
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
// Request a ConnectionAuthorization of type text file which contains the
// credentials
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win")) {
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
}
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandler auth = authFactory.getConnectionAuthorizationHandler("text", credFile);
// Set it
connectConfig.setAuthorization(auth);
......@@ -159,7 +166,7 @@ public class RemoteCommandTest {
@Test
public void testRemoteCommand() {
System.out.println("Testing remote command configuration");
// Get a command which just sets everything up
RemoteCommand command = new RemoteCommand(commandConfig, connectConfig, null);
......@@ -223,10 +230,9 @@ public class RemoteCommandTest {
badConfig.setOS(System.getProperty("os.name"));
ConnectionAuthorizationHandlerFactory authFactory = new ConnectionAuthorizationHandlerFactory();
String credFile = "/tmp/ice-remote-creds.txt";
if (System.getProperty("os.name").toLowerCase().contains("win")) {
credFile = "C:\\Users\\Administrator\\ice-remote-creds.txt";
}
String credFile = dataPath.resolve("commands/ice-remote-creds.txt").toString();
ConnectionAuthorizationHandler auth = authFactory.getConnectionAuthorizationHandler("text", credFile);
// Set it
ConnectionConfiguration cfg = new ConnectionConfiguration();
......
......@@ -63,7 +63,6 @@ public class RemoteCopyFileCommandTest {
// Set up the connection using the code already established in
// RemoteFileHandlerTest
RemoteFileHandlerTest.setUpBeforeClass();
}
/**
......
......@@ -37,6 +37,7 @@ import org.eclipse.ice.commands.ConnectionManager;
import org.eclipse.ice.commands.ConnectionManagerFactory;
import org.eclipse.ice.commands.RemoteFileBrowser;
import org.eclipse.ice.commands.RemoteFileHandler;
import org.eclipse.ice.tests.data.TestDataPath;