79371: Cannot export Metadata (CSV) from Collection #1132

This commit is contained in:
Peter Nijs
2021-05-12 21:56:12 +02:00
parent 845c938329
commit 23e389432c

View File

@@ -101,7 +101,7 @@ public class MetadataExportIT
} }
} }
@Test(expected = ParseException.class) @Test
public void metadataExportToCsvTestUUID() throws Exception { public void metadataExportToCsvTestUUID() throws Exception {
context.turnOffAuthorisationSystem(); context.turnOffAuthorisationSystem();
Community community = CommunityBuilder.createCommunity(context) Community community = CommunityBuilder.createCommunity(context)
@@ -116,7 +116,8 @@ public class MetadataExportIT
+ testProps.get("test.exportcsv").toString(); + testProps.get("test.exportcsv").toString();
String[] args = new String[] {"metadata-export", String[] args = new String[] {"metadata-export",
"-i", String.valueOf(item.getID())}; "-i", String.valueOf(item.getID()),
"-f", fileLocation};
TestDSpaceRunnableHandler testDSpaceRunnableHandler TestDSpaceRunnableHandler testDSpaceRunnableHandler
= new TestDSpaceRunnableHandler(); = new TestDSpaceRunnableHandler();
@@ -128,7 +129,7 @@ public class MetadataExportIT
assertTrue(fileContent.contains(String.valueOf(item.getID()))); assertTrue(fileContent.contains(String.valueOf(item.getID())));
} }
@Test(expected = ParseException.class) @Test
public void metadataExportToCsvTestUUIDParent() throws Exception { public void metadataExportToCsvTestUUIDParent() throws Exception {
context.turnOffAuthorisationSystem(); context.turnOffAuthorisationSystem();
Community community = CommunityBuilder.createCommunity(context) Community community = CommunityBuilder.createCommunity(context)
@@ -143,7 +144,8 @@ public class MetadataExportIT
+ testProps.get("test.exportcsv").toString(); + testProps.get("test.exportcsv").toString();
String[] args = new String[] {"metadata-export", String[] args = new String[] {"metadata-export",
"-i", String.valueOf(collection.getID())}; "-i", String.valueOf(collection.getID()),
"-f", fileLocation};
TestDSpaceRunnableHandler testDSpaceRunnableHandler TestDSpaceRunnableHandler testDSpaceRunnableHandler
= new TestDSpaceRunnableHandler(); = new TestDSpaceRunnableHandler();
@@ -155,7 +157,7 @@ public class MetadataExportIT
assertTrue(fileContent.contains(String.valueOf(item.getID()))); assertTrue(fileContent.contains(String.valueOf(item.getID())));
} }
@Test(expected = ParseException.class) @Test
public void metadataExportToCsvTestUUIDGrandParent() throws Exception { public void metadataExportToCsvTestUUIDGrandParent() throws Exception {
context.turnOffAuthorisationSystem(); context.turnOffAuthorisationSystem();
Community community = CommunityBuilder.createCommunity(context) Community community = CommunityBuilder.createCommunity(context)
@@ -170,7 +172,8 @@ public class MetadataExportIT
+ testProps.get("test.exportcsv").toString(); + testProps.get("test.exportcsv").toString();
String[] args = new String[] {"metadata-export", String[] args = new String[] {"metadata-export",
"-i", String.valueOf(community.getID())}; "-i", String.valueOf(community.getID()),
"-f", fileLocation};
TestDSpaceRunnableHandler testDSpaceRunnableHandler TestDSpaceRunnableHandler testDSpaceRunnableHandler
= new TestDSpaceRunnableHandler(); = new TestDSpaceRunnableHandler();