agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/submission/AbstractJobSubmissionTest.java
/**
    * Copies local test data to the location specified as default values
    * for the {@link SoftwareInput} associated with the given {@code software}
    * value.
    * @param software the software for which input data will be staged.
    * @throws Exception if things go sideways
    */
Copies local test data to the location specified as default values
for the  SoftwareInput associated with the given  software
value.
@param software the software for which input data will be staged.
@throws Exception if things go sideways
Copies local test data to the location specified as default values for the SoftwareInput associated with the given software value . @param software the software for which input data will be staged . @throws Exception if things go sideways
protected void stageSoftwareInputDefaultData(Software software) throws Exception {
       RemoteDataClient remoteDataClient = null;
       URI uri = null;
       try {
           for(SoftwareInput input: software.getInputs()) {
               for (JsonNode jsonNode : input.getDefaultValueAsJsonArray()) {
                   String inputVal = jsonNode.asText();
                   uri = URI.create(inputVal);
                   remoteDataClient = new RemoteDataClientFactory().getInstance(SYSTEM_OWNER, null, uri);
                   remoteDataClient.authenticate();
                   remoteDataClient.mkdirs(FilenameUtils.getPathNoEndSeparator(uri.getPath()));
                   remoteDataClient.put(TEST_INPUT_FILE, uri.getPath());
                   Assert.assertTrue(remoteDataClient.doesExist(uri.getPath()),
                           "Failed to copy software default input file " + TEST_INPUT_FILE
                                   + "to " + uri);
               }
           }
       } catch (Exception e) {
           Assert.fail("Failed to copy software default input file " + TEST_INPUT_FILE 
                   + "to " + uri, e);
       } finally {
           if (remoteDataClient != null) {
               remoteDataClient.disconnect();
           }
       }
   }
protected void stageSoftwareInputDefaultData ( Software software ) throws Exception { RemoteDataClient remoteDataClient = null ; URI uri = null ; try { for ( SoftwareInput input : software . getInputs ( ) ) { for ( JsonNode jsonNode : input . getDefaultValueAsJsonArray ( ) ) { String inputVal = jsonNode . asText ( ) ; uri = URI . create ( inputVal ) ; remoteDataClient = new RemoteDataClientFactory ( ) . getInstance ( SYSTEM_OWNER , null , uri ) ; remoteDataClient . authenticate ( ) ; remoteDataClient . mkdirs ( FilenameUtils . getPathNoEndSeparator ( uri . getPath ( ) ) ) ; remoteDataClient . put ( TEST_INPUT_FILE , uri . getPath ( ) ) ; Assert . assertTrue ( remoteDataClient . doesExist ( uri . getPath ( ) ) , "Failed to copy software default input file " + TEST_INPUT_FILE + "to " + uri ) ; } } } catch ( Exception e ) { Assert . fail ( "Failed to copy software default input file " + TEST_INPUT_FILE + "to " + uri , e ) ; } finally { if ( remoteDataClient != null ) { remoteDataClient . disconnect ( ) ; } } }
Copies local test data to the location specified as default values
 for the {@link SoftwareInput} associated with the given {@code software}
 value.
Copies local test data to the location specified as default values for the { @link SoftwareInput } associated with the given { @code software } value .