Skip to content

Commit

Permalink
ufal/be-add-missing-fileextension (#414)
Browse files Browse the repository at this point in the history
* Added missing bitstream-formats.xml

* Fixed unit test

* Updated failed integration tests.
  • Loading branch information
milanmajchrak authored Aug 11, 2023
1 parent b0ce562 commit ed2eab3
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ public void testDeleteUnknown() throws SQLException, AuthorizeException {
@Test
public void testGetExtensions() {
assertThat("testGetExtensions 0", bf.getExtensions(), notNullValue());
assertTrue("testGetExtensions 1", bf.getExtensions().size() == 1);
assertTrue("testGetExtensions 1", bf.getExtensions().size() == 2);
assertThat("testGetExtensions 2", bf.getExtensions().get(0), equalTo("xml"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class BitstreamFormatRestRepositoryIT extends AbstractControllerIntegrati
@Autowired
private BitstreamFormatConverter bitstreamFormatConverter;

private final int DEFAULT_AMOUNT_FORMATS = 81;
private final int DEFAULT_AMOUNT_FORMATS = 89;

@Test
public void findAllPaginationTest() throws Exception {
Expand Down
77 changes: 77 additions & 0 deletions dspace/config/registries/bitstream-formats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
<support_level>1</support_level>
<internal>false</internal>
<extension>xml</extension>
<extension>trs</extension>
</bitstream-type>

<bitstream-type>
Expand Down Expand Up @@ -791,4 +792,80 @@
<extension>mp3</extension>
</bitstream-type>

<!-- CLARIN UPDATE Start -->

<bitstream-type>
<mimetype>application/x-tar</mimetype>
<short_description>tar</short_description>
<description>Tape archive</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>tar</extension>
</bitstream-type>

<bitstream-type>
<mimetype>application/x-rar-compressed</mimetype>
<short_description>rar</short_description>
<description>RAR</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>rar</extension>
</bitstream-type>

<bitstream-type>
<mimetype>application/x-bzip2</mimetype>
<short_description>bzip2</short_description>
<description>bzip2</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>bz2</extension>
</bitstream-type>

<bitstream-type>
<mimetype>application/x-xz</mimetype>
<short_description>xz</short_description>
<description>xz</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>xz</extension>
</bitstream-type>

<bitstream-type>
<mimetype>application/zip</mimetype>
<short_description>zip</short_description>
<description>ZIP</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>zip</extension>
</bitstream-type>

<bitstream-type>
<mimetype>application/x-gtar</mimetype>
<short_description>tgz</short_description>
<description>tar with gzip</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>tgz</extension>
<extension>tar.gz</extension>
</bitstream-type>

<bitstream-type>
<mimetype>application/x-bzip</mimetype>
<short_description>bz</short_description>
<description>BZip archive</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>bz</extension>
</bitstream-type>

<bitstream-type>
<mimetype>application/gzip</mimetype>
<short_description>gz</short_description>
<description>GZip Compressed Archive</description>
<support_level>1</support_level>
<internal>false</internal>
<extension>gz</extension>
</bitstream-type>

<!-- CLARIN UPDATE End -->
</dspace-bitstream-types>

0 comments on commit ed2eab3

Please sign in to comment.