Run Integration Test with specific configuration

14 views
Skip to first unread message

Istvan Vig

unread,
Sep 19, 2022, 10:24:18 AM9/19/22
to DSpace Technical Support
Hello!
I would like to create an integration test for the version 7.4. And I would like to run this test in the way where the org.dspace.identifier.VersionedHandleIdentifierProviderWithCanonicalHandles is uncommented in the identifier-service.xml:
```XML
    <bean id="org.dspace.identifier.HandleIdentifierProvider" class="org.dspace.identifier.VersionedHandleIdentifierProviderWithCanonicalHandles" scope="singleton"> <property name="configurationService" ref="org.dspace.services.ConfigurationService"/> </bean>
```
However, I do not know how should I set up the test env. in order to use this versioning option. I copied the identifier-service.xml into the folders dspace-api/src/test/data/dspaceFolder/config/spring/api and dspace-server-webapp/src/test/data/dspaceFolder/config/spring/api with the uncommented lines. Then I ran the test and I then checked the file dspace-server-webapp/target/testing/dspace/config/spring/api/identifier-service.xml and found that the uncommented lines are there.

But when I run the integration test and print out the generated handles I see the default versioning functionality. So it seems that the test does not use the VersionedHandleIdentifierProviderWithCanonicalHandles class as I expected.

Could you please someone support me on how should I set up the integration test in order to use the canonical handles version? Is there any function in the test environment to modify this configuration at load time (like the configuration service)? Thanks!
Reply all
Reply to author
Forward
0 new messages