Skip to content

Commit

Permalink
LIBDRUM-867. Update test DSpace configuration in "dspace-api"
Browse files Browse the repository at this point in the history
The stock DSpace files in "dspace/config" must be modified by UMD, in
order for DRUM-specific classes in "dspace/modules" to be included.

This causes some "dspace-api" tests to fail, because the UMD-specific
classes are not available. To enable the "dspace-api" tests to succeed,
stock versions of the configuration files modifed in "dspace/config" are
placed in the "dspace-api/src/test/data/dspaceFolder".

To determine which files may need to be updated, run:

```
$ git diff --name-only <DSPACE_TAG> -- dspace-api/src/test/data/dspaceFolder/
```

where <DSPACE_TAG> is the DSpace release tag being updated to. For
example when updating the codebase for "dspace-7.6.2", the command
would be:

```
$ git diff --name-only dspace-7.6.2 -- dspace-api/src/test/data/dspaceFolder/
```

This will generate a list of filenames, such as:

```
dspace-api/src/test/data/dspaceFolder/config/hibernate.cfg.xml
dspace-api/src/test/data/dspaceFolder/config/spring/api/bitstore.xml
dspace-api/src/test/data/dspaceFolder/config/spring/api/core-dao-services.xml
dspace-api/src/test/data/dspaceFolder/config/spring/api/core-services.xml
```

Then for each file, place the stock version of the corresponding
"dspace/config" file into the "dspace-api/src/test/data" folder. One
way to do this is the following command:

```
$ git show <DSPACE_TAG>:<DSPACE_FILENAME> > <DSPACE-API_FILENAME>
```

where <DSPACE_TAG> is the tag of the release being updated to,
<DSPACE_FILENAME> is the filepath of the file in the “dspace/config”
directory, and <DSPACE-API_FILENAME> is the filepath of the file in the
“dspace-api” directory. For example, for the "core-services.xml" file in
the above list, the command would be:

```
git show dspace-7.6.2:dspace/config/spring/api/core-services.xml > dspace-api/src/test/data/dspaceFolder/config/spring/api/core-services.xml
```

This commit contains the only file that needed to be updated.

https://umd-dit.atlassian.net/browse/LIBDRUM-867
  • Loading branch information
dsteelma-umd committed Sep 30, 2024
1 parent f37a19c commit 31a1103
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<bean class="org.dspace.authority.AuthorityValueServiceImpl"/>
<bean class="org.dspace.authority.AuthorityServiceImpl"/>

<bean class="org.dspace.browse.ItemCounter"/>
<bean id="itemCountDAO" class="org.dspace.browse.ItemCountDAOSolr" scope="prototype"/>

<bean class="org.dspace.checker.ChecksumHistoryServiceImpl"/>
<bean class="org.dspace.checker.ChecksumResultServiceImpl"/>
<bean class="org.dspace.checker.MostRecentChecksumServiceImpl"/>
Expand Down

0 comments on commit 31a1103

Please sign in to comment.