Skip to content
Snippets Groups Projects
Commit f4470b23 authored by cramakri's avatar cramakri
Browse files

LMS-1887 Fixed test to ignore svn stuff.

SVN: 18859
parent 387f7c84
No related branches found
No related tags found
No related merge requests found
...@@ -20,6 +20,7 @@ import java.io.File; ...@@ -20,6 +20,7 @@ import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import org.jmock.Expectations; import org.jmock.Expectations;
...@@ -203,6 +204,7 @@ public class CommandGetReplicaTest extends AbstractFileSystemTestCase ...@@ -203,6 +204,7 @@ public class CommandGetReplicaTest extends AbstractFileSystemTestCase
}); });
} }
@SuppressWarnings("unchecked")
private ArrayList<FileInfoDssDTO> getFileInfosForPath(File file) throws IOException private ArrayList<FileInfoDssDTO> getFileInfosForPath(File file) throws IOException
{ {
ArrayList<FileInfoDssDTO> fileInfos = new ArrayList<FileInfoDssDTO>(); ArrayList<FileInfoDssDTO> fileInfos = new ArrayList<FileInfoDssDTO>();
...@@ -219,6 +221,14 @@ public class CommandGetReplicaTest extends AbstractFileSystemTestCase ...@@ -219,6 +221,14 @@ public class CommandGetReplicaTest extends AbstractFileSystemTestCase
FileInfoDssBuilder builder = new FileInfoDssBuilder(path, path); FileInfoDssBuilder builder = new FileInfoDssBuilder(path, path);
builder.appendFileInfosForFile(file, fileInfos, true); builder.appendFileInfosForFile(file, fileInfos, true);
// Strip SVN stuff
for (FileInfoDssDTO fileInfo : (ArrayList<FileInfoDssDTO>) fileInfos.clone())
{
if (fileInfo.getPathInDataSet().matches(".*/.svn/.*"))
fileInfos.remove(fileInfo);
}
return fileInfos; return fileInfos;
} }
...@@ -239,6 +249,13 @@ public class CommandGetReplicaTest extends AbstractFileSystemTestCase ...@@ -239,6 +249,13 @@ public class CommandGetReplicaTest extends AbstractFileSystemTestCase
"REPLICA-ID" }); "REPLICA-ID" });
assertEquals(ResultCode.OK, exitCode); assertEquals(ResultCode.OK, exitCode);
String[] bundleContents = outputFolder.list();
Arrays.sort(bundleContents);
assertEquals(2, bundleContents.length);
assertEquals("Annotations", bundleContents[0]);
assertEquals("RawData", bundleContents[1]);
context.assertIsSatisfied(); context.assertIsSatisfied();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment